Commit d25ca80d authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

New TC_CSE_DMR_CRE_012_CNT_CR added


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent d3efe7ba
......@@ -2203,7 +2203,7 @@ module OneM2M_Testcases_CSE {
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var template RequestPrimitive v_request := mw_createRemoteCSE;
var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute cseType";
v_utRequest.primitiveContent.remoteCSE.cseType := "UNINITIALIZED";
v_utRequest.primitiveContent.remoteCSE.cseType := int1;//TODO It should be marked as "UNITIALIZED"
v_request.primitiveContent.remoteCSE.cseType := ?;
f_CSE_REG_CRE_026(v_utRequest,v_request,v_action);
}
......@@ -5453,7 +5453,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
const AttributeAux c_optionalAttribute := {"accessControlPolicyIDs", omit};
const AttributeList c_optionalAttribute := {"accessControlPolicyIDs"};
v_createRequest.primitiveContent.container.accessControlPolicyIDs := {"NotInitialized"};
......@@ -5465,7 +5465,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
const AttributeAux c_optionalAttribute := {"expirationTime", omit};
const AttributeList c_optionalAttribute := {"expirationTime"};
v_createRequest.primitiveContent.container.expirationTime := "20301231T012345";
......@@ -5478,7 +5478,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
const AttributeAux c_optionalAttribute := {"labels", omit};
const AttributeList c_optionalAttribute := {"labels"};
v_createRequest.primitiveContent.container.labels := {"MyLabel"};
......@@ -5491,7 +5491,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
const AttributeAux c_optionalAttribute := {"maxNrOfInstances", omit};
const AttributeList c_optionalAttribute := {"maxNrOfInstances"};
v_createRequest.primitiveContent.container.maxNrOfInstances := 0;
......@@ -5504,7 +5504,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
const AttributeAux c_optionalAttribute := {"maxByteSize", omit};
const AttributeList c_optionalAttribute := {"maxByteSize"};
v_createRequest.primitiveContent.container.maxByteSize := 0;
......@@ -5517,7 +5517,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
const AttributeAux c_optionalAttribute := {"maxInstanceAge", omit};
const AttributeList c_optionalAttribute := {"maxInstanceAge"};
v_createRequest.primitiveContent.container.maxInstanceAge := 0;
......@@ -5526,13 +5526,13 @@ module OneM2M_Testcases_CSE {
}
testcase TC_CSE_DMR_CRE_012_CNT_OR() runs on Tester system CseSystem {
testcase TC_CSE_DMR_CRE_012_CNT_CR() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
const AttributeAux c_optionalAttribute := {"ontologyRef", omit};
const AttributeList c_optionalAttribute := {"creator"};
v_createRequest.primitiveContent.container.ontologyRef := "MyOntologyRef";
v_createRequest.primitiveContent.container.creator := "Unitialized";
v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, c_optionalAttribute));
v_ae1.done;
......@@ -5543,7 +5543,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
const AttributeAux c_optionalAttribute := {"expirationTime", omit};
const AttributeList c_optionalAttribute := {"expirationTime"};
v_createRequest.primitiveContent.contentInstance.expirationTime := "20301231T012345";
......@@ -5555,7 +5555,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
const AttributeAux c_optionalAttribute := {"labels", omit};
const AttributeList c_optionalAttribute := {"labels"};
v_createRequest.primitiveContent.contentInstance.labels := {"MyLabel"};
......@@ -5568,9 +5568,9 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
const AttributeAux c_optionalAttribute := {"creator", omit};
const AttributeList c_optionalAttribute := {"creator"};
v_createRequest.primitiveContent.contentInstance.creator := "MyCreator";
v_createRequest.primitiveContent.contentInstance.creator := "NotInitialized";
v_ae1.start(f_CSE_DMR_CRE_012(int4, v_createRequest, c_optionalAttribute));
v_ae1.done;
......@@ -5581,7 +5581,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
const AttributeAux c_optionalAttribute := {"contentInfo", omit};
const AttributeList c_optionalAttribute := {"contentInfo"};
v_createRequest.primitiveContent.contentInstance.contentInfo := "MyContentInfo";
......@@ -5594,7 +5594,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
const AttributeAux c_optionalAttribute := {"ontologyRef", omit};
const AttributeList c_optionalAttribute := {"ontologyRef"};
v_createRequest.primitiveContent.contentInstance.ontologyRef := "MyOntologyRef";
......@@ -5607,7 +5607,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createAcpBase;
const AttributeAux c_optionalAttribute := {"expirationTime", omit};
const AttributeList c_optionalAttribute := {"expirationTime"};
v_createRequest.primitiveContent.accessControlPolicy.expirationTime := "20301231T012345";
......@@ -5620,7 +5620,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createAcpBase;
const AttributeAux c_optionalAttribute := {"labels", omit};
const AttributeList c_optionalAttribute := {"labels"};
v_createRequest.primitiveContent.accessControlPolicy.labels := {"MyLabel"};
......@@ -5633,7 +5633,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"accessControlPolicyIDs", omit};
const AttributeList c_optionalAttribute := {"accessControlPolicyIDs"};
v_createRequest.primitiveContent.subscription.accessControlPolicyIDs := {"NotInitialized"};
......@@ -5645,7 +5645,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"expirationTime", omit};
const AttributeList c_optionalAttribute := {"expirationTime"};
v_createRequest.primitiveContent.subscription.expirationTime := "20301231T012345";
......@@ -5658,7 +5658,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"labels", omit};
const AttributeList c_optionalAttribute := {"labels"};
v_createRequest.primitiveContent.subscription.labels := {"MyLabel"};
......@@ -5671,7 +5671,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"eventNotificationCriteria", omit};
const AttributeList c_optionalAttribute := {"eventNotificationCriteria"};
v_createRequest.primitiveContent.subscription.eventNotificationCriteria := valueof(m_eventNotificationCriteria({int1}, -));
......@@ -5684,7 +5684,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"expirationCounter", omit};
const AttributeList c_optionalAttribute := {"expirationCounter"};
v_createRequest.primitiveContent.subscription.expirationCounter := 1;
......@@ -5697,7 +5697,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"groupID", omit};
const AttributeList c_optionalAttribute := {"groupID"};
v_createRequest.primitiveContent.subscription.groupID := "MyGroupID";
......@@ -5710,7 +5710,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"notificationForwardingURI", omit};
const AttributeList c_optionalAttribute := {"notificationForwardingURI"};
v_createRequest.primitiveContent.subscription.notificationForwardingURI := "MyForwardingURI";
......@@ -5723,7 +5723,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"batchNotify", omit};
const AttributeList c_optionalAttribute := {"batchNotify"};
v_createRequest.primitiveContent.subscription.batchNotify := {0, "PT1S"};
......@@ -5735,7 +5735,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"rateLimit", omit};
const AttributeList c_optionalAttribute := {"rateLimit"};
v_createRequest.primitiveContent.subscription.rateLimit := {0, omit};
......@@ -5748,7 +5748,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"preSubscriptionNotify", omit};
const AttributeList c_optionalAttribute := {"preSubscriptionNotify"};
v_createRequest.primitiveContent.subscription.preSubscriptionNotify := 1;
......@@ -5761,7 +5761,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"pendingNotification", omit};
const AttributeList c_optionalAttribute := {"pendingNotification"};
v_createRequest.primitiveContent.subscription.pendingNotification := int1;
......@@ -5773,7 +5773,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"notificationStoragePriority", omit};
const AttributeList c_optionalAttribute := {"notificationStoragePriority"};
v_createRequest.primitiveContent.subscription.notificationStoragePriority := 1;
......@@ -5786,7 +5786,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"latestNotify", omit};
const AttributeList c_optionalAttribute := {"latestNotify"};
v_createRequest.primitiveContent.subscription.latestNotify := true;
......@@ -5799,7 +5799,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"notificationContentType", omit};
const AttributeList c_optionalAttribute := {"notificationContentType"};
v_createRequest.primitiveContent.subscription.notificationContentType := int1;
......@@ -5812,7 +5812,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"notificationEventCat", omit};
const AttributeList c_optionalAttribute := {"notificationEventCat"};
v_createRequest.primitiveContent.subscription.notificationEventCat := {alt_1 := 100};
......@@ -5825,7 +5825,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"creator", omit};
const AttributeList c_optionalAttribute := {"creator"};
v_createRequest.primitiveContent.subscription.creator := "MyCreator";
......@@ -5838,7 +5838,7 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeAux c_optionalAttribute := {"subscriberURI", omit};
const AttributeList c_optionalAttribute := {"subscriberURI"};
v_createRequest.primitiveContent.subscription.subscriberURI := "MySubscriberURI";
......@@ -5847,7 +5847,7 @@ module OneM2M_Testcases_CSE {
}
function f_CSE_DMR_CRE_012(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeAux p_optionalAttribute) runs on AeSimu {
function f_CSE_DMR_CRE_012(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeList p_optionalAttribute) runs on AeSimu {
// Local variables
var MsgIn v_response;
......@@ -5860,7 +5860,7 @@ module OneM2M_Testcases_CSE {
var integer v_resourceIndex := -1;
// Test control
if(match(c_accessControlPolicyIDs,p_optionalAttribute.name)) {
if(p_optionalAttribute[0] == c_accessControlPolicyIDs) {
if(not(PICS_ACP_SUPPORT)) {
setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case");
stop;
......@@ -5873,7 +5873,7 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
if (match(c_accessControlPolicyIDs, p_optionalAttribute.name)) {
if (p_optionalAttribute[0] == c_accessControlPolicyIDs) {
v_acpAuxIndex := f_cse_preamble_createAcpAux();//c_CRUDNDi)
}
......@@ -5888,6 +5888,9 @@ module OneM2M_Testcases_CSE {
}
// Test Body
if(p_optionalAttribute[0] == "creator") {
p_requestPrimitive.primitiveContent.container.creator := vc_resourcesList[v_parentIndex].resource.aE.aE_ID;
}
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex);
mcaPort.send(m_request(v_request));
......@@ -5895,7 +5898,7 @@ module OneM2M_Testcases_CSE {
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & p_optionalAttribute.name);
setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & p_optionalAttribute[0]);
f_checkAttributesToBeSaved(p_resourceType, v_request, v_response.primitive.responsePrimitive);
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment