예제 #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());
 }