Пример #1
0
 public void BodyAsIAModelInheritanceTest()
 {
     IAModelInheritance expected = new IAModelInheritance();
     expected.Number = 50;
     expected.NumberTwo = 60;
     IADeSerialization deSerialization = new IADeSerialization();
     deSerialization.SetBodyWith(expected);
     IAModelInheritance actual = deSerialization.BodyAs<IAModelInheritance>();
     Assert.AreEqual(expected, actual);
 }
Пример #2
0
        public void SetBodyWithWithAnIAModelInheritanceTest()
        {
            IAModelInheritance model = new IAModelInheritance();

            model.Number    = 50;
            model.NumberTwo = 60;
            IADeSerialization deSerialization = new IADeSerialization();

            deSerialization.SetBodyWith(model);
            Assert.AreEqual("{\"NumberTwo\":60,\"Number\":50}", deSerialization.BodyAsString());
        }
Пример #3
0
        public void BodyAsIAModelInheritanceTest()
        {
            IAModelInheritance expected = new IAModelInheritance();

            expected.Number    = 50;
            expected.NumberTwo = 60;
            IADeSerialization deSerialization = new IADeSerialization();

            deSerialization.SetBodyWith(expected);
            IAModelInheritance actual = deSerialization.BodyAs <IAModelInheritance>();

            Assert.AreEqual(expected, actual);
        }
Пример #4
0
        public override bool Equals(Object obj)
        {
            if (this == obj)
            {
                return(true);
            }

            if (obj == null || (obj as IAModelInheritance) == null)
            {
                return(false);
            }

            IAModelInheritance model = (IAModelInheritance)obj;

            return((this.Number == model.Number) && (this.NumberTwo == model.NumberTwo));
        }
Пример #5
0
 public void SetBodyWithWithAnIAModelInheritanceTest()
 {
     IAModelInheritance model = new IAModelInheritance();
     model.Number = 50;
     model.NumberTwo = 60;
     IADeSerialization deSerialization = new IADeSerialization();
     deSerialization.SetBodyWith(model);
     Assert.AreEqual("{\"NumberTwo\":60,\"Number\":50}", deSerialization.BodyAsString());
 }