• Home
  • Raw
  • Download

Lines Matching refs:Assert

64             Assert.AreEqual(false, message.SingleBool);  in DefaultValues()
65 Assert.AreEqual(ByteString.Empty, message.SingleBytes); in DefaultValues()
66 Assert.AreEqual(0.0, message.SingleDouble); in DefaultValues()
67 Assert.AreEqual(0, message.SingleFixed32); in DefaultValues()
68 Assert.AreEqual(0L, message.SingleFixed64); in DefaultValues()
69 Assert.AreEqual(0.0f, message.SingleFloat); in DefaultValues()
70 Assert.AreEqual(ForeignEnum.ForeignUnspecified, message.SingleForeignEnum); in DefaultValues()
71 Assert.IsNull(message.SingleForeignMessage); in DefaultValues()
72 Assert.AreEqual(ImportEnum.Unspecified, message.SingleImportEnum); in DefaultValues()
73 Assert.IsNull(message.SingleImportMessage); in DefaultValues()
74 Assert.AreEqual(0, message.SingleInt32); in DefaultValues()
75 Assert.AreEqual(0L, message.SingleInt64); in DefaultValues()
76 Assert.AreEqual(TestAllTypes.Types.NestedEnum.Unspecified, message.SingleNestedEnum); in DefaultValues()
77 Assert.IsNull(message.SingleNestedMessage); in DefaultValues()
78 Assert.IsNull(message.SinglePublicImportMessage); in DefaultValues()
79 Assert.AreEqual(0, message.SingleSfixed32); in DefaultValues()
80 Assert.AreEqual(0L, message.SingleSfixed64); in DefaultValues()
81 Assert.AreEqual(0, message.SingleSint32); in DefaultValues()
82 Assert.AreEqual(0L, message.SingleSint64); in DefaultValues()
83 Assert.AreEqual("", message.SingleString); in DefaultValues()
84 Assert.AreEqual(0U, message.SingleUint32); in DefaultValues()
85 Assert.AreEqual(0UL, message.SingleUint64); in DefaultValues()
88 Assert.AreEqual(0, message.RepeatedBool.Count); in DefaultValues()
89 Assert.AreEqual(0, message.RepeatedBytes.Count); in DefaultValues()
90 Assert.AreEqual(0, message.RepeatedDouble.Count); in DefaultValues()
91 Assert.AreEqual(0, message.RepeatedFixed32.Count); in DefaultValues()
92 Assert.AreEqual(0, message.RepeatedFixed64.Count); in DefaultValues()
93 Assert.AreEqual(0, message.RepeatedFloat.Count); in DefaultValues()
94 Assert.AreEqual(0, message.RepeatedForeignEnum.Count); in DefaultValues()
95 Assert.AreEqual(0, message.RepeatedForeignMessage.Count); in DefaultValues()
96 Assert.AreEqual(0, message.RepeatedImportEnum.Count); in DefaultValues()
97 Assert.AreEqual(0, message.RepeatedImportMessage.Count); in DefaultValues()
98 Assert.AreEqual(0, message.RepeatedNestedEnum.Count); in DefaultValues()
99 Assert.AreEqual(0, message.RepeatedNestedMessage.Count); in DefaultValues()
100 Assert.AreEqual(0, message.RepeatedPublicImportMessage.Count); in DefaultValues()
101 Assert.AreEqual(0, message.RepeatedSfixed32.Count); in DefaultValues()
102 Assert.AreEqual(0, message.RepeatedSfixed64.Count); in DefaultValues()
103 Assert.AreEqual(0, message.RepeatedSint32.Count); in DefaultValues()
104 Assert.AreEqual(0, message.RepeatedSint64.Count); in DefaultValues()
105 Assert.AreEqual(0, message.RepeatedString.Count); in DefaultValues()
106 Assert.AreEqual(0, message.RepeatedUint32.Count); in DefaultValues()
107 Assert.AreEqual(0, message.RepeatedUint64.Count); in DefaultValues()
110 Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.None, message.OneofFieldCase); in DefaultValues()
111 Assert.AreEqual(0, message.OneofUint32); in DefaultValues()
112 Assert.AreEqual("", message.OneofString); in DefaultValues()
113 Assert.AreEqual(ByteString.Empty, message.OneofBytes); in DefaultValues()
114 Assert.IsNull(message.OneofNestedMessage); in DefaultValues()
121 Assert.Throws<ArgumentNullException>(() => message.SingleString = null); in NullStringAndBytesRejected()
122 Assert.Throws<ArgumentNullException>(() => message.OneofString = null); in NullStringAndBytesRejected()
123 Assert.Throws<ArgumentNullException>(() => message.SingleBytes = null); in NullStringAndBytesRejected()
124 Assert.Throws<ArgumentNullException>(() => message.OneofBytes = null); in NullStringAndBytesRejected()
133 Assert.AreEqual(0, bytes.Length); in RoundTrip_Empty()
249Assert.AreEqual(2, bytes.Length); // Tag for field entry (1 byte), length of entry (0; 1 byte) in MapWithEmptyEntry()
258 Assert.AreEqual(1, parsed.MapInt32Bytes.Count); in MapWithEmptyEntry()
259 Assert.AreEqual(ByteString.Empty, parsed.MapInt32Bytes[0]); in MapWithEmptyEntry()
282 Assert.AreEqual(nestedMessage, parsed.MapInt32ForeignMessage[0]); in MapWithOnlyValue()
304 Assert.AreEqual(0.0, parsed.MapInt32Double[key]); in MapWithOnlyKey_PrimitiveValue()
326 Assert.AreEqual(new ForeignMessage(), parsed.MapInt32ForeignMessage[key]); in MapWithOnlyKey_MessageValue()
359 Assert.AreEqual(value, parsed.MapInt32Int32[key]); in MapIgnoresExtraFieldsWithinEntryMessages()
388 Assert.AreEqual(value, parsed.MapInt32Int32[key]); in MapFieldOrderIsIrrelevant()
445 Assert.AreEqual(expected, parsed); in MapNonContiguousEntries()
481 Assert.AreEqual(value2, parsed.MapInt32Int32[key]); in DuplicateKeys_LastEntryWins()
508 Assert.AreNotSame(original, clone); in CloneSingleNonMessageValues()
509 Assert.AreEqual(original, clone); in CloneSingleNonMessageValues()
512 Assert.AreNotEqual(original, clone); in CloneSingleNonMessageValues()
539 Assert.AreNotSame(original, clone); in CloneRepeatedNonMessageValues()
540 Assert.AreEqual(original, clone); in CloneRepeatedNonMessageValues()
543 Assert.AreNotEqual(original, clone); in CloneRepeatedNonMessageValues()
555 Assert.AreNotSame(original, clone); in CloneSingleMessageField()
556 Assert.AreNotSame(original.SingleNestedMessage, clone.SingleNestedMessage); in CloneSingleMessageField()
557 Assert.AreEqual(original, clone); in CloneSingleMessageField()
560 Assert.AreNotEqual(original, clone); in CloneSingleMessageField()
572 Assert.AreNotSame(original, clone); in CloneRepeatedMessageField()
573 Assert.AreNotSame(original.RepeatedNestedMessage, clone.RepeatedNestedMessage); in CloneRepeatedMessageField()
574 Assert.AreNotSame(original.RepeatedNestedMessage[0], clone.RepeatedNestedMessage[0]); in CloneRepeatedMessageField()
575 Assert.AreEqual(original, clone); in CloneRepeatedMessageField()
578 Assert.AreNotEqual(original, clone); in CloneRepeatedMessageField()
590 Assert.AreNotSame(original, clone); in CloneOneofField()
591 Assert.AreEqual(original, clone); in CloneOneofField()
595 Assert.AreNotEqual(original, clone); in CloneOneofField()
604 Assert.AreEqual("", message.OneofString); in OneofProperties()
605 Assert.AreEqual(0, message.OneofUint32); in OneofProperties()
606 Assert.AreEqual(ByteString.Empty, message.OneofBytes); in OneofProperties()
607 Assert.IsNull(message.OneofNestedMessage); in OneofProperties()
608 Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.None, message.OneofFieldCase); in OneofProperties()
611 Assert.AreEqual("sample", message.OneofString); in OneofProperties()
612 Assert.AreEqual(0, message.OneofUint32); in OneofProperties()
613 Assert.AreEqual(ByteString.Empty, message.OneofBytes); in OneofProperties()
614 Assert.IsNull(message.OneofNestedMessage); in OneofProperties()
615 Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.OneofString, message.OneofFieldCase); in OneofProperties()
619 Assert.AreEqual("", message.OneofString); in OneofProperties()
620 Assert.AreEqual(0, message.OneofUint32); in OneofProperties()
621 Assert.AreEqual(bytes, message.OneofBytes); in OneofProperties()
622 Assert.IsNull(message.OneofNestedMessage); in OneofProperties()
623 Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.OneofBytes, message.OneofFieldCase); in OneofProperties()
626 Assert.AreEqual("", message.OneofString); in OneofProperties()
627 Assert.AreEqual(20, message.OneofUint32); in OneofProperties()
628 Assert.AreEqual(ByteString.Empty, message.OneofBytes); in OneofProperties()
629 Assert.IsNull(message.OneofNestedMessage); in OneofProperties()
630 Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.OneofUint32, message.OneofFieldCase); in OneofProperties()
634 Assert.AreEqual("", message.OneofString); in OneofProperties()
635 Assert.AreEqual(0, message.OneofUint32); in OneofProperties()
636 Assert.AreEqual(ByteString.Empty, message.OneofBytes); in OneofProperties()
637 Assert.AreEqual(nestedMessage, message.OneofNestedMessage); in OneofProperties()
638Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.OneofNestedMessage, message.OneofFieldCase); in OneofProperties()
641 Assert.AreEqual("", message.OneofString); in OneofProperties()
642 Assert.AreEqual(0, message.OneofUint32); in OneofProperties()
643 Assert.AreEqual(ByteString.Empty, message.OneofBytes); in OneofProperties()
644 Assert.IsNull(message.OneofNestedMessage); in OneofProperties()
645 Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.None, message.OneofFieldCase); in OneofProperties()
653 Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.OneofString, message1.OneofFieldCase); in Oneof_DefaultValuesNotEqual()
654 Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.OneofUint32, message2.OneofFieldCase); in Oneof_DefaultValuesNotEqual()
655 Assert.AreNotEqual(message1, message2); in Oneof_DefaultValuesNotEqual()
665 Assert.AreEqual(3, bytes.Length); // 2 bytes for the tag + 1 for the value - no string! in OneofSerialization_NonDefaultValue()
671Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.OneofUint32, parsedMessage.OneofFieldCase); in OneofSerialization_NonDefaultValue()
682Assert.AreEqual(3, bytes.Length); // 2 bytes for the tag + 1 for the value - it's still serialized in OneofSerialization_DefaultValue()
688Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.OneofUint32, parsedMessage.OneofFieldCase); in OneofSerialization_DefaultValue()
699Assert.IsFalse(TestAllTypes.Descriptor.Fields.InDeclarationOrder().Select(x => x.FieldNumber).Cont… in DiscardUnknownFields_RealDataStillRead()
767 Assert.AreEqual("{ \"c\": 31, \"@cInHex\": \"1f\" }", message.ToString()); in CustomDiagnosticMessage_DirectToStringCall()
768 Assert.AreEqual("{ \"c\": 31 }", JsonFormatter.Default.Format(message)); in CustomDiagnosticMessage_DirectToStringCall()
775Assert.AreEqual("{ \"singleForeignMessage\": { \"c\": 16, \"@cInHex\": \"10\" } }", message.ToStri… in CustomDiagnosticMessage_Nested()
776Assert.AreEqual("{ \"singleForeignMessage\": { \"c\": 16 } }", JsonFormatter.Default.Format(messag… in CustomDiagnosticMessage_Nested()
785 Assert.AreEqual("{ \"c\": 31 }", writer.ToString()); in CustomDiagnosticMessage_DirectToTextWriterCall()