public void AddClassOfService_NullConnectionServer_Failure() { ClassOfService oCos; WebCallResult res = ClassOfService.AddClassOfService(null, "display", null, out oCos); Assert.IsFalse(res.Success, "Static call to AddClassOfSerice did not fail with: null ConnectionServer"); }
public void GetClassesOfService_NullConnectionServer_Failure() { List <ClassOfService> oCoses; var res = ClassOfService.GetClassesOfService(null, out oCoses); Assert.IsFalse(res.Success, "Static call to GetClassesOfService did not fail with: null ConnectionServer"); }
public void UpdateClassOfService_NullConnectionServer_Failure() { //GetClassesOfService var res = ClassOfService.UpdateClassOfService(null, "bogus", null); Assert.IsFalse(res.Success, "Static call to UpdateClassOfService did not fail with: null ConnectionServer"); }
public void GetClassOfService_EmptyObjectIdAndName_Failure() { ClassOfService oCos; var res = ClassOfService.GetClassOfService(out oCos, _mockServer); Assert.IsFalse(res.Success, "Static call to GetClassOfService did not fail with: empty objectId and Name"); }
public void RefetchClassOfServiceData_EmptyObject_Failure() { ClassOfService oCos = new ClassOfService(_mockServer); var res = oCos.RefetchClassOfServiceData(); Assert.IsFalse(res.Success, "Refetching data on an empty class instance should fail"); }
internal static void WriteHeader(byte[] buffer, int offset, ClassOfService priorityCodePoint, bool canonicalFormatIndicator, ushort vLanIdentifier, EthernetType etherType) { ushort tagControlInformation = CalculateTagControlInformation(priorityCodePoint, canonicalFormatIndicator, vLanIdentifier); buffer.Write(offset + Offset.PriorityCodePoint, tagControlInformation, Endianity.Big); buffer.Write(offset + Offset.EtherTypeLength, (ushort)etherType, Endianity.Big); }
public void DeleteClassOfService_NullConnectionServer_Failure() { //DeleteClassOfService var res = ClassOfService.DeleteClassOfService(null, "bogus"); Assert.IsFalse(res.Success, "Static call to DeleteClassOfService did not fail with: null connectionServer"); }
public void GetClassOfService_NullConnectionServer_Failure() { ClassOfService oCos; var res = ClassOfService.GetClassOfService(out oCos, null, "bogus", "bogus"); Assert.IsFalse(res.Success, "Static call to GetClassOfService did not fail with: null ConnectionServer"); }
internal static void WriteHeader(byte[] buffer, int offset, ClassOfService priorityCodePoint, bool canonicalFormatIndicator, ushort vLanIdentifier, EthernetType etherType) { ushort num = VLanTaggedFrameDatagram.CalculateTagControlInformation(priorityCodePoint, canonicalFormatIndicator, vLanIdentifier); ByteArrayExtensions.Write(buffer, offset, num, Endianity.Big); ByteArrayExtensions.Write(buffer, offset + 2, (ushort)etherType, Endianity.Big); }
public void Constructor_EmptyNameAndId_Success() { ClassOfService oTemp = new ClassOfService(_mockServer); Console.WriteLine(oTemp.ToString()); Console.WriteLine(oTemp.DumpAllProps()); }
public void Constructor_Default_Success() { ClassOfService oTemp = new ClassOfService(); Console.WriteLine(oTemp.UniqueIdentifier); Console.WriteLine(oTemp.SelectionDisplayString); }
public void StaticMethodFailures_DeleteClassOfService() { //DeleteClassOfService var res = ClassOfService.DeleteClassOfService(_connectionServer, "bogus"); Assert.IsFalse(res.Success, "Static call to DeleteClassOfService did not fail with: invalid objectid"); }
public void OutcallRestrictionTable_ErrorResponse_Null() { ClassOfService oCos = new ClassOfService(_mockServer); RestrictionTable oTable = oCos.OutcallRestrictionTable(true); Assert.IsNull(oTable, "Fetching restriction table on empty instance should return null"); }
public static PacketBuilder BuildVLanTaggedFramePacketBuilder(ClassOfService CoS) { EthernetLayer ethernetLayer = new EthernetLayer { Source = new MacAddress("01:01:01:01:01:01"), Destination = new MacAddress("90:1B:0E:1B:DD:E8"), EtherType = EthernetType.None, // Will be filled automatically. }; VLanTaggedFrameLayer vLanTaggedFrameLayer = new VLanTaggedFrameLayer { PriorityCodePoint = CoS, CanonicalFormatIndicator = false, VLanIdentifier = 50, EtherType = (EthernetType)34962, }; PayloadLayer payloadLayer = new PayloadLayer { Data = new Datagram(new byte[1496]) }; return(new PacketBuilder(ethernetLayer, vLanTaggedFrameLayer, payloadLayer)); }
public void PropertyGetFetch_Undeletable() { ClassOfService oCos = new ClassOfService(_mockServer); const bool expectedValue = true; oCos.Undeletable = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("Undeletable", expectedValue), "Undeletable value get fetch failed"); }
public void PropertyGetFetch_UpdateBroadcastMessage() { ClassOfService oCos = new ClassOfService(); const bool expectedValue = true; oCos.UpdateBroadcastMessage = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("UpdateBroadcastMessage", expectedValue), "UpdateBroadcastMessage value get fetch failed"); }
public void PropertyGetFetch_SttType() { ClassOfService oCos = new ClassOfService(_mockServer); const int expectedValue = 34; oCos.SttType = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("SttType", expectedValue), "SttType value get fetch failed"); }
public void PropertyGetFetch_MaxMembersPVL() { ClassOfService oCos = new ClassOfService(); const int expectedValue = 44; oCos.MaxMembersPVL = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("MaxMembersPVL", expectedValue), "MaxMembersPVL value get fetch failed"); }
public void StaticMethodFailures_UpdateClassOfService() { //GetClassesOfService var res = ClassOfService.UpdateClassOfService(_connectionServer, "bogus", null); Assert.IsFalse(res.Success, "Static call to UpdateClassOfService did not fail with: invalid objectId"); }
public void PropertyGetFetch_AccessSTT() { ClassOfService oCos = new ClassOfService(_mockServer); const bool expectedValue = true; oCos.AccessSTT = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("AccessSTT", expectedValue), "AccessSTT value get fetch failed"); }
public void PropertyGetFetch_RequireSecureMessages() { ClassOfService oCos = new ClassOfService(_mockServer); const int expectedValue = 33; oCos.RequireSecureMessages = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("RequireSecureMessages", expectedValue), "RequireSecureMessages value get fetch failed"); }
public void PropertyGetFetch_AccessUnifiedClient() { ClassOfService oCos = new ClassOfService(); const bool expectedValue = true; oCos.AccessUnifiedClient = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("AccessUnifiedClient", expectedValue), "AccessUnifiedClient value get fetch failed"); }
public void PropertyGetFetch_AccessAdvancedUserFeatures() { ClassOfService oCos = new ClassOfService(); const bool expectedValue = true; oCos.AccessAdvancedUserFeatures = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("AccessAdvancedUserFeatures", expectedValue), "AccessAdvancedUserFeatures value get fetch failed"); }
public void PropertyGetFetch_ReadOnly() { ClassOfService oCos = new ClassOfService(); const bool expectedValue = true; oCos.ReadOnly = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("ReadOnly", expectedValue), "ReadOnly value get fetch failed"); }
public void StaticMethodFailures_GetClassOfService() { //GetClassOfService ClassOfService oCos; var res = ClassOfService.GetClassOfService(out oCos, _connectionServer, "bogus", "bogus"); Assert.IsFalse(res.Success, "Static call to GetClassOfService did not fail with: invalid ObjectId"); }
public void PropertyGetFetch_ImapCanFetchPrivateMessageBody() { ClassOfService oCos = new ClassOfService(); const bool expectedValue = true; oCos.ImapCanFetchPrivateMessageBody = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("ImapCanFetchPrivateMessageBody", expectedValue), "ImapCanFetchPrivateMessageBody value get fetch failed"); }
public void PropertyGetFetch_MessagePlaybackRestriction() { ClassOfService oCos = new ClassOfService(_mockServer); const int expectedValue = 11; oCos.MessagePlaybackRestriction = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("MessagePlaybackRestriction", expectedValue), "MessagePlaybackRestriction value get fetch failed"); }
public void PropertyGetFetch_DisplayName() { ClassOfService oCos = new ClassOfService(_mockServer); const string expectedValue = "String test value"; oCos.DisplayName = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("DisplayName", expectedValue), "DisplayName value get fetch failed"); }
public void PropertyGetFetch_EnableSTTSecureMessage() { ClassOfService oCos = new ClassOfService(_mockServer); const int expectedValue = 22; oCos.EnableSTTSecureMessage = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("EnableSTTSecureMessage", expectedValue), "EnableSTTSecureMessage value get fetch failed"); }
public void PropertyGetFetch_WarnMinMsgLength() { ClassOfService oCos = new ClassOfService(); const int expectedValue = 55; oCos.WarnMinMsgLength = expectedValue; Assert.IsTrue(oCos.ChangeList.ValueExists("WarnMinMsgLength", expectedValue), "WarnMinMsgLength value get fetch failed"); }
internal static ushort CalculateTagControlInformation(ClassOfService priorityCodePoint, bool canonicalFormatIndicator, ushort vLanIdentifier) { return (ushort)(((((((byte)priorityCodePoint) << Shift.PriorityCodePoint) & Mask.PriorityCodePoint) | (canonicalFormatIndicator ? Mask.CanonicalFormatIndicator : 0x00)) << 8) | (vLanIdentifier & Mask.VLanIdentifier)); }