Exemplo n.º 1
0
        public void GivenUploadFileCommandIsValid()
        {
            var uploadedFile = new DummyHttpPostedFile();

            _given.Command = new UploadFile(uploadedFile, "dummy/relative/directory", "dummy-url-friendly-name.jpg", Dummy.DateTimeOffset(), Dummy.Author());
        }
Exemplo n.º 2
0
        public void WhenICallName()
        {
            var page = new Page(_given.RelativeUri, Dummy.Title(), Dummy.Content(), Dummy.Published(), Dummy.Author());

            _actual.Result = page.Name;
        }
Exemplo n.º 3
0
 public void GivenAuthorIsValid()
 {
     _given.Git.Author = Dummy.Author();
 }
Exemplo n.º 4
0
        public void GivenOneBlogPostIsPublishedEveryDay()
        {
            for (var published = _given.PublishedFirstDate; published <= _given.PublishedLastDate; published = published.AddDays(1))
            {
                var title       = Dummy.Title(_given.TitleFormat, published);
                var relativeUri = Dummy.RelativeUri("blog", published, title);
                var blogPost    = new BlogPost(relativeUri, title, Dummy.Content(), published, Dummy.Author());

                _blogPostRepository.PublishAsync(blogPost).Wait();
            }
        }