Example #1
0
		public void SerializeDeserialize_TestStruct_AreEqual()
		{
			var input = WeekDateTest.TestStruct;
			var exp = WeekDateTest.TestStruct;
			var act = SerializationTest.SerializeDeserialize(input);
			Assert.AreEqual(exp, act);
		}
Example #2
0
        public void SerializeDeserialize_TestStruct_AreEqual()
        {
            var input = CryptographicSeedTest.TestStruct;
            var exp   = CryptographicSeedTest.TestStruct;
            var act   = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp, act);
        }
        public void RoundTrip_keeps_not_supported_type()
        {
            var exception = new EventTypeNotSupported(typeof(int), typeof(SimpleEventSourcedRoot));
            var actual    = SerializationTest.SerializeDeserialize(exception);

            Assert.AreEqual(typeof(int), actual.EventType);
            Assert.AreEqual(typeof(SimpleEventSourcedRoot), actual.AggregateType);
        }
Example #4
0
        public void SerializeDeserialize_TestStruct_AreEqual()
        {
            var input = BankIdentifierCodeTest.TestStruct;
            var exp   = BankIdentifierCodeTest.TestStruct;
            var act   = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp, act);
        }
        public void SerializeDeserialize_TestStruct_AreEqual()
        {
            var input = GetTestInstance();
            var exp   = GetTestInstance();
            var act   = SerializationTest.SerializeDeserialize(input);

            CollectionAssert.AreEqual(exp, act);
        }
Example #6
0
        public void SerializeDeserialize_TestStruct_AreEqual()
        {
            var input = FormattingArgumentsTest.TestStruct;
            var exp   = FormattingArgumentsTest.TestStruct;
            var act   = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp, act);
        }
Example #7
0
        public void SerializeDeserialize_TestStruct_AreEqual()
        {
            var input = HouseNumberTest.TestStruct;
            var exp   = HouseNumberTest.TestStruct;
            var act   = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp, act);
        }
Example #8
0
        public void SerializeDeserialize_TestStruct_AreEqual()
        {
            var input = InternationalBankAccountNumberTest.TestStruct;
            var exp   = InternationalBankAccountNumberTest.TestStruct;
            var act   = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp, act);
        }
Example #9
0
        public void SerializeDeserialize_TestStruct_AreEqual()
        {
            var input = InternetMediaTypeTest.TestStruct;
            var exp   = InternetMediaTypeTest.TestStruct;
            var act   = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp, act);
        }
Example #10
0
        public void SerializeDeserialize_TestStruct_AreEqual()
        {
            var input = EmailAddressTest.TestStruct;
            var exp   = EmailAddressTest.TestStruct;
            var act   = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp, act);
        }
Example #11
0
        public void SerializeDeserialize_TestStruct_AreEqual()
        {
            var input = LocalDateTimeTest.TestStructNoMilliseconds;
            var exp   = LocalDateTimeTest.TestStructNoMilliseconds;
            var act   = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp, act);
        }
Example #12
0
		public void SerializeDeserialize_Empty_AreEqual()
		{
			var input = new WeekDateSerializeObject()
			{
				Id = 17,
				Obj = WeekDateTest.TestStruct,
				Date = new DateTime(1970, 02, 14),
			};
			var exp = new WeekDateSerializeObject()
			{
				Id = 17,
				Obj = WeekDateTest.TestStruct,
				Date = new DateTime(1970, 02, 14),
			};
			var act = SerializationTest.SerializeDeserialize(input);
			Assert.AreEqual(exp.Id, act.Id, "Id");
			Assert.AreEqual(exp.Obj, act.Obj, "Obj");
			DateTimeAssert.AreEqual(exp.Date, act.Date, "Date");;
		}
Example #13
0
        public void SerializeDeserialize_FormattableArgumentsSerializeObject_AreEqual()
        {
            var input = new FormattableArgumentsSerializeObject()
            {
                Id   = 17,
                Obj  = FormattingArgumentsTest.TestStruct,
                Date = new DateTime(1970, 02, 14),
            };
            var exp = new FormattableArgumentsSerializeObject()
            {
                Id   = 17,
                Obj  = FormattingArgumentsTest.TestStruct,
                Date = new DateTime(1970, 02, 14),
            };
            var act = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp.Id, act.Id, "Id");
            Assert.AreEqual(exp.Obj, act.Obj, "Obj");
            DateTimeAssert.AreEqual(exp.Date, act.Date, "Date");;
        }
Example #14
0
        public void SerializeDeserialize_MinValue_AreEqual()
        {
            var input = new WeekDateSerializeObject
            {
                Id   = 17,
                Obj  = WeekDate.MinValue,
                Date = new DateTime(1970, 02, 14),
            };
            var exp = new WeekDateSerializeObject
            {
                Id   = 17,
                Obj  = WeekDate.MinValue,
                Date = new DateTime(1970, 02, 14),
            };
            var act = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp.Id, act.Id, "Id");
            Assert.AreEqual(exp.Obj, act.Obj, "Obj");
            Assert.AreEqual(exp.Date, act.Date, "Date");
        }
        public void SerializeDeserialize_EmailAddressSerializeObject_AreEqual()
        {
            var input = new EmailAddressCollectionSerializeObject()
            {
                Id   = 17,
                Obj  = GetTestInstance(),
                Date = new DateTime(1970, 02, 14),
            };
            var exp = new EmailAddressCollectionSerializeObject()
            {
                Id   = 17,
                Obj  = GetTestInstance(),
                Date = new DateTime(1970, 02, 14),
            };
            var act = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp.Id, act.Id, "Id");
            CollectionAssert.AreEqual(exp.Obj, act.Obj, "Obj");
            DateTimeAssert.AreEqual(exp.Date, act.Date, "Date");;
        }
Example #16
0
        public void SerializeDeserialize_GenderSerializeObject_AreEqual()
        {
            var input = new GenderSerializeObject
            {
                Id   = 17,
                Obj  = GenderTest.TestStruct,
                Date = new DateTime(1970, 02, 14),
            };
            var exp = new GenderSerializeObject
            {
                Id   = 17,
                Obj  = GenderTest.TestStruct,
                Date = new DateTime(1970, 02, 14),
            };
            var act = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp.Id, act.Id, "Id");
            Assert.AreEqual(exp.Obj, act.Obj, "Obj");
            Assert.AreEqual(exp.Date, act.Date, "Date");
        }
Example #17
0
        public void SerializeDeserialize_Empty_AreEqual()
        {
            var input = new InternationalBankAccountNumberSerializeObject
            {
                Id   = 17,
                Obj  = InternationalBankAccountNumber.Empty,
                Date = new DateTime(1970, 02, 14),
            };
            var exp = new InternationalBankAccountNumberSerializeObject
            {
                Id   = 17,
                Obj  = InternationalBankAccountNumber.Empty,
                Date = new DateTime(1970, 02, 14),
            };
            var act = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp.Id, act.Id, "Id");
            Assert.AreEqual(exp.Obj, act.Obj, "Obj");
            Assert.AreEqual(exp.Date, act.Date, "Date");
        }
Example #18
0
        public void SerializeDeserialize_Empty_AreEqual()
        {
            var input = new BusinessIdentifierCodeSerializeObject
            {
                Id   = 17,
                Obj  = BusinessIdentifierCode.Empty,
                Date = new DateTime(1970, 02, 14),
            };
            var exp = new BusinessIdentifierCodeSerializeObject
            {
                Id   = 17,
                Obj  = BusinessIdentifierCode.Empty,
                Date = new DateTime(1970, 02, 14),
            };
            var act = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp.Id, act.Id, "Id");
            Assert.AreEqual(exp.Obj, act.Obj, "Obj");
            Assert.AreEqual(exp.Date, act.Date, "Date");
        }
Example #19
0
        public void SerializeDeserialize_Empty_AreEqual()
        {
            var input = new EmailAddressSerializeObject
            {
                Id   = 17,
                Obj  = EmailAddress.Empty,
                Date = new DateTime(1970, 02, 14),
            };
            var exp = new EmailAddressSerializeObject
            {
                Id   = 17,
                Obj  = EmailAddress.Empty,
                Date = new DateTime(1970, 02, 14),
            };
            var act = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp.Id, act.Id, "Id");
            Assert.AreEqual(exp.Obj, act.Obj, "Obj");
            Assert.AreEqual(exp.Date, act.Date, "Date");
        }
Example #20
0
        public void SerializeDeserialize_Zero_AreEqual()
        {
            var input = new EloSerializeObject
            {
                Id   = 17,
                Obj  = Elo.Zero,
                Date = new DateTime(1970, 02, 14),
            };
            var exp = new EloSerializeObject
            {
                Id   = 17,
                Obj  = Elo.Zero,
                Date = new DateTime(1970, 02, 14),
            };
            var act = SerializationTest.SerializeDeserialize(input);

            Assert.AreEqual(exp.Id, act.Id, "Id");
            Assert.AreEqual(exp.Obj, act.Obj, "Obj");
            Assert.AreEqual(exp.Date, act.Date, "Date");
        }
Example #21
0
        public void SerializeDeserialize_TestStruct_AreEqual()
        {
            var act = SerializationTest.SerializeDeserialize(TestPattern);

            DebuggerDisplayAssert.HasResult("{t?st*}, SingleOrTrailing, Ordinal", act);
        }