Inheritance: DomainObject
Esempio n. 1
0
        public void AddingSimplePropertyReturnsJustId()
        {
            var obj = new NamedDomainObject {Name = "TestName"};

            obj.SetIdTo(42);

            var result = JsonConvert.SerializeObject(obj);

            const string jsonString = "{\"Id\":42}";

            Assert.AreEqual(jsonString, result);
        }
Esempio n. 2
0
        public void AddingSimplePropertyReturnsJustId()
        {
            var obj = new NamedDomainObject {
                Name = "TestName"
            };

            obj.SetIdTo(42);

            var result = JsonConvert.SerializeObject(obj);

            const string jsonString = "{\"Id\":42}";

            Assert.AreEqual(jsonString, result);
        }