Beispiel #1
0
            public void ShouldNotBeEmpty()
            {
                var html = new HtmlContent {
                    Content = "Foo"
                };
                var result = html.ToJson();

                Assert.IsNotEmpty(result);
            }
Beispiel #2
0
        public void ToJson()
        {
            var html = new HtmlContent {
                Content = "Foo"
            };
            var result = html.ToJson();

            Assert.NotEmpty(result);
        }
Beispiel #3
0
        public void ExportJson()
        {
            var html = new HtmlContent
            {
                Content = "Foo"
            };

            var result = html.ToJson();
            const string key = "\"Content\": \"Foo\"";
            Assert.NotEqual( result.IndexOf( key ), -1 );
        }
            public void ShouldExportAsJson()
            {
                var html = new HtmlContent
                    {
                        Content = "Foo"
                    };

                var result = html.ToJson();
                const string key = "\"Content\": \"Foo\"";
                Assert.Greater( result.IndexOf( key ), -1, string.Format( "'{0}' was not found in '{1}'.", key, result ) );
            }
Beispiel #5
0
        public void ExportJson()
        {
            var html = new HtmlContent
            {
                Content = "Foo"
            };

            var          result = html.ToJson();
            const string key    = "\"Content\":\"Foo\"";

            Assert.NotEqual(result.IndexOf(key), -1);
        }
Beispiel #6
0
            public void ShouldExportAsJson()
            {
                var html = new HtmlContent
                {
                    Content = "Foo"
                };

                var          result = html.ToJson();
                const string key    = "\"Content\": \"Foo\"";

                Assert.Greater(result.IndexOf(key), -1, string.Format("'{0}' was not found in '{1}'.", key, result));
            }
            public void ShouldCopyPropertiesToEntity()
            {
                var obj = new HtmlContent
                    {
                        EntityValue = "Some Value",
                        IsApproved = true
                    };

                var json = obj.ToJson();
                var htmlContent = HtmlContent.FromJson( json );
                Assert.AreEqual( obj.EntityValue, htmlContent.EntityValue );
                Assert.AreEqual( obj.IsApproved, htmlContent.IsApproved );
            }
Beispiel #8
0
        public void Clone()
        {
            var obj = new HtmlContent
            {
                EntityValue = "Some Value",
                IsApproved = true
            };

            var json = obj.ToJson();
            var htmlContent = HtmlContent.FromJson( json );
            Assert.Equal( obj.EntityValue, htmlContent.EntityValue );
            Assert.Equal( obj.IsApproved, htmlContent.IsApproved );
        }
Beispiel #9
0
        public void Clone()
        {
            var obj = new HtmlContent
            {
                EntityValue = "Some Value",
                IsApproved  = true
            };

            var json        = obj.ToJson();
            var htmlContent = HtmlContent.FromJson(json);

            Assert.Equal(obj.EntityValue, htmlContent.EntityValue);
            Assert.Equal(obj.IsApproved, htmlContent.IsApproved);
        }
Beispiel #10
0
            public void ShouldCopyPropertiesToEntity()
            {
                var obj = new HtmlContent
                {
                    EntityValue = "Some Value",
                    IsApproved  = true
                };

                var json        = obj.ToJson();
                var htmlContent = HtmlContent.FromJson(json);

                Assert.AreEqual(obj.EntityValue, htmlContent.EntityValue);
                Assert.AreEqual(obj.IsApproved, htmlContent.IsApproved);
            }
 public void ShouldNotBeEmpty()
 {
     var html = new HtmlContent { Content = "Foo" };
     var result = html.ToJson();
     Assert.IsNotEmpty( result );
 }
Beispiel #12
0
 public void ToJson()
 {
     var html = new HtmlContent { Content = "Foo" };
     var result = html.ToJson();
     Assert.NotEmpty( result );
 }