public static void VerifyObjectGroupObjectDataForIntermediateNode(ObjectGroupObjectData objectGroupObjectData, ObjectGroupObjectDeclare intermediateDeclare, List<ObjectGroupDataElementData> objectGroupList, ITestSite site)
{
#region Verify the Object Group Object Data
ExGUIDArray childObjectExGuidArray = objectGroupObjectData.ObjectExGUIDArray;
if (childObjectExGuidArray != null && childObjectExGuidArray.Count.DecodedValue != 0)
{
// If the intermediate node can be build then verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R65
site.CaptureRequirement(
"MS-FSSHTTPD",
65,
@"[In Intermediate Node Object References] The Object Extended GUID Array, as specified in [MS-FSSHTTPB] section 2.2.1.12.6.4, of the Intermediate Node Object MUST specify an ordered set of Object Extended GUIDs.");
// If the intermediate node can be build then verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R8007 and MS-FSSHTTPD_R8008
site.CaptureRequirement(
"MS-FSSHTTPD",
8007,
@"[In Common Node Object Properties][Intermediate of Object Extended GUID Array field] Specifies an ordered list of the Object Extended GUIDs for each child of this Node.");
// Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R8008
site.CaptureRequirement(
"MS-FSSHTTPD",
8008,
@"[In Common Node Object Properties][Intermediate of Object Extended GUID Array field] Object Extended GUID Array entries MUST be ordered based on the sequential file bytes represented by each Node Object.");
}
// Cell ID Array : Specifies an empty list of Cell IDs.
CellIDArray cellIDArray = objectGroupObjectData.CellIDArray;
// Add the log information.
site.Log.Add(LogEntryKind.Debug, "The count of Cell ID Array is:{0}", cellIDArray.Count);
// If the Cell ID Array is an empty list, indicates that the count of the array is 0.
// So capture these requirements.
// Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R5
site.CaptureRequirementIfAreEqual<ulong>(
0,
cellIDArray.Count,
"MS-FSSHTTPD",
5,
@"[In Common Node Object Properties][Intermediate of Cell ID Array field] Specifies an empty list of Cell IDs.");
// Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R67
site.CaptureRequirementIfAreEqual<ulong>(
0,
cellIDArray.Count,
"MS-FSSHTTPD",
67,
@"[In Intermediate Node Object Cell References] The Cell Reference Array of the Object MUST specify an empty array.");
#endregion
#region Verify the Object Group Object Declaration
// Object Extended GUID : An extended GUID which specifies an identifier for this object. This GUID MUST be unique within this file.
ExGuid currentObjectExGuid = intermediateDeclare.ObjectExtendedGUID;
// Check whether Object Extended GUID is unique.
bool isVerify8102 = IsGuidUnique(currentObjectExGuid, objectGroupList);
// Add the log information.
site.Log.Add(LogEntryKind.Debug, "Whether the Object Extended GUID is unique:{0}", isVerify8102);
// Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R8102
site.CaptureRequirementIfIsTrue(
isVerify8102,
"MS-FSSHTTPD",
8102,
@"[In Common Node Object Properties][Intermediate of Object Extended GUID Field] This GUID[Object Extended GUID] MUST be different within this file in once response.");
// Object Partition ID : A compact unsigned 64-bit integer which MUST be 1.
Compact64bitInt objectPartitionID = intermediateDeclare.ObjectPartitionID;
// Add the log information.
site.Log.Add(LogEntryKind.Debug, "The value of Object Partition ID is:{0}", objectPartitionID.DecodedValue);
site.Assert.IsTrue(typeof(Compact64bitInt).Equals(objectPartitionID.GetType()), "The type of objectPartitionID should be a compact unsigned 64-bit integer.");
site.Assert.IsTrue(objectPartitionID.DecodedValue == 1, "The actual value of objectPartitionID should be 1.");
// Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R18
site.CaptureRequirement(
"MS-FSSHTTPD",
18,
@"[In Common Node Object Properties][Intermediate of Object Partition ID field] A compact unsigned 64-bit integer that MUST be ""1"".");
// Object Data Size :A compact unsigned 64-bit integer which MUST be the size of the Object Data field.
Compact64bitInt objectDataSize = intermediateDeclare.ObjectDataSize;
// Add the log information.
site.Log.Add(LogEntryKind.Debug, "The value of Object Data Size is:{0}", objectDataSize.DecodedValue);
site.Assert.IsTrue(typeof(Compact64bitInt).Equals(objectDataSize.GetType()), "The type of objectPartitionID should be a compact unsigned 64-bit integer.");
// Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R21
site.CaptureRequirement(
"MS-FSSHTTPD",
21,
@"[In Common Node Object Properties][Intermediate of Object Data Size field] A compact unsigned 64-bit integer that MUST be the size of the Object Data field.");
// Object References Count : A compact unsigned 64-bit integer that specifies the number of object references.
Compact64bitInt objectReferencesCount = intermediateDeclare.ObjectReferencesCount;
// Add the log information.
site.Log.Add(LogEntryKind.Debug, "The count of Object References is:{0}", objectReferencesCount.DecodedValue);
site.Assert.IsTrue(typeof(Compact64bitInt).Equals(objectReferencesCount.GetType()), "The type of objectReferencesCount should be a compact unsigned 64-bit integer.");
// Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R24
site.CaptureRequirement(
"MS-FSSHTTPD",
24,
@"[In Common Node Object Properties][Intermediate of Object References Count field] A compact unsigned 64-bit integer that specifies the number of object references.");
// Cell References Count : A compact unsigned 64-bit integer which MUST be 0.
Compact64bitInt cellReferencesCount = intermediateDeclare.CellReferencesCount;
// Add the log information.
site.Log.Add(LogEntryKind.Debug, "The value of Cell References is:{0}", cellReferencesCount.DecodedValue);
site.Assert.IsTrue(typeof(Compact64bitInt).Equals(cellReferencesCount.GetType()), "The type of cellReferencesCount should be a compact unsigned 64-bit integer.");
site.Assert.IsTrue(cellReferencesCount.DecodedValue == 0, "The value of cellReferencesCount should be 0.");
// Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R27
site.CaptureRequirement(
"MS-FSSHTTPD",
27,
@"[In Common Node Object Properties][Intermediate of Cell References Count field] A compact unsigned 64-bit integer that MUST be zero.");
#endregion
}