Beispiel #1
0
        private IEnumerable<Post> GetStubPosts()
        {
            var post = new Post
                {
                    Title = "Using HTML5's \"data\" Attributes with ASP.NET MVC's Input Helpers",
                    Posted = new DateTime(2012, 2, 13, 14, 31, 00),
                    IsActive = true
                };
            post.Body = _contentRepository.GetPostBody(post.Slug);
            yield return post;

            post = new Post
                {
                    Title = "Disable \"Track Changes\" in SQL Server Management Studio",
                    Posted = new DateTime(2011, 12, 30, 11, 50, 00),
                    IsActive = true
                };
            post.Body = _contentRepository.GetPostBody(post.Slug);
            yield return post;

            post = new Post
                {
                    Title = "Recreating the CTXNA Button Style in Pure CSS",
                    Posted = new DateTime(2011, 10, 2, 16, 40, 00),
                    IsActive = true
                };
            post.Body = _contentRepository.GetPostBody(post.Slug);
            yield return post;

            post = new Post
                {
                    Title = "Binding to a UserControl's Dependency Property",
                    Posted = new DateTime(2011, 09, 30, 11, 09, 00),
                    IsActive = true
                };
            post.Body = _contentRepository.GetPostBody(post.Slug);
            yield return post;

            post = new Post
                {
                    Title = "Breaking Your Old HTML Habits",
                    Posted = new DateTime(2011, 07, 01, 14, 51, 24),
                    IsActive = true
                };
            post.Body = _contentRepository.GetPostBody(post.Slug);
            yield return post;

            post = new Post
                {
                    Title = "Simple Validation Visuals for Windows Phone 7",
                    Posted = new DateTime(2011, 08, 05, 10, 09, 03),
                    IsActive = true
                };
            post.Body = _contentRepository.GetPostBody(post.Slug);
            yield return post;
        }
Beispiel #2
0
 public void Should_slugify_quotation_marks()
 {
     var post = new Post { Title = "A \"Sample\" Post" };
     post.Slug.ShouldEqual("a-sample-post");
 }
Beispiel #3
0
 public void Should_slugify_a_basic_string()
 {
     var post = new Post { Title = "A Sample Post" };
     post.Slug.ShouldEqual("a-sample-post");
 }
Beispiel #4
0
 public void Should_slugify_periods()
 {
     var post = new Post { Title = "A Sample. Post" };
     post.Slug.ShouldEqual("a-sample-post");
 }
Beispiel #5
0
 public void Should_slugify_apostrophes()
 {
     var post = new Post { Title = "A Sample's Post" };
     post.Slug.ShouldEqual("a-samples-post");
 }