Ejemplo n.º 1
0
        public void NotHaveArticlesWithSameTitle()
        {
            var sut = new Author("nicm");

            // Act
            Article article1 = sut.BeginArticle("Article1");
            Article article2 = sut.BeginArticle("Article1");

            Assert.NotNull(article1);
            Assert.Null(article2);
        }
Ejemplo n.º 2
0
        public void BeginNewArticle()
        {
            var sut = new Author("nicm");

            // Act
            sut.BeginArticle("New article");

            Assert.Single(sut.Articles);
        }
Ejemplo n.º 3
0
        public void DeleteArticleByTitle()
        {
            var sut = new Author("nicm");

            sut.BeginArticle("new article");

            // Act
            sut.DeleteArticle("new article");

            Assert.Empty(sut.Articles);
        }
Ejemplo n.º 4
0
        public AuthorRepositoryFake()
        {
            var nicm = new Author("nicm");

            nicm.BeginArticle("My article");
            var ems = new Author("ems");

            authors = new List <Author> {
                nicm,
                ems,
            };
        }