コード例 #1
0
        public void ImportJson()
        {
            var obj = new PageRoute
            {
                Route    = "/some/path",
                IsSystem = true
            };

            var json      = obj.ToJson();
            var pageRoute = PageRoute.FromJson(json);

            Assert.That.AreEqual(obj.Route, pageRoute.Route);
            Assert.That.AreEqual(obj.IsSystem, pageRoute.IsSystem);
        }
コード例 #2
0
            public void ShouldCopyPropertiesToEntity()
            {
                var obj = new PageRoute
                {
                    Route    = "/some/path",
                    IsSystem = true
                };

                var json      = obj.ToJson();
                var pageRoute = PageRoute.FromJson(json);

                Assert.AreEqual(obj.Route, pageRoute.Route);
                Assert.AreEqual(obj.IsSystem, pageRoute.IsSystem);
            }