Exemplo n.º 1
0
        public void BooksTest()
        {
            // Arrange
            DALLibrary.DomainModel.Book book = new DALLibrary.DomainModel.Book()
            {
                ID      = 1,
                Title   = "TitleTest",
                Author  = "AuthorTest",
                Content = "ContentTest"
            };
            // Act
            var testingValue = book.TitleAndAuthor();

            // Assert
            Assert.Equal(book.Title + " " + book.Author, testingValue);
        }
Exemplo n.º 2
0
        public void IsDivideCorrectMultiDots()
        {
            // Arrange
            DALLibrary.DomainModel.Book book = new DALLibrary.DomainModel.Book()
            {
                ID      = 1,
                Title   = "TitleTest",
                Author  = "AuthorTest",
                Content = "In April 1992, a young man from a well-to-do East Coast family hitchhiked to Alaska and walked alone into the wilderness north of Mt. McKinley. Four months later his decomposed body was found by a party of moose hunters... Shortly after the discovery of the corpse, I was asked by the editor of Outside magazine to report on the puzzling circumstances of the boy’s death. His name turned out to be Christopher Johnson McCandless."
            };

            // Act
            var devidedContentList = _bookHelper.DivideBook(book.Content);

            // Assert
            Assert.Equal("In April 1992, a young man from a well-to-do East Coast family hitchhiked to Alaska and walked alone into the wilderness north of Mt. McKinley. Four months later his decomposed body was found by a party of moose hunters...", devidedContentList[0]);
            Assert.Equal("Shortly after the discovery of the corpse, I was asked by the editor of Outside magazine to report on the puzzling circumstances of the boy’s death. His name turned out to be Christopher Johnson McCandless.", devidedContentList[1]);
        }
Exemplo n.º 3
0
        public void IsDivideCorrectNormalModeEqual200Chart()
        {
            // Arrange
            DALLibrary.DomainModel.Book book = new DALLibrary.DomainModel.Book()
            {
                ID      = 1,
                Title   = "TitleTest",
                Author  = "AuthorTest",
                Content = "In April 1992, a young man from a well-to-do East Coast family hitchhiked to Alaska and walked alone into the wilderness north of Mt. McKinley. Four months later his decomposed body was found by a party of moose hunters. Shortly after the discovery of the corpse, I was asked by the editor of Outside magazine to report on the puzzling circumstances of the boy’s death. His name turned out to be Christopher Johnson McCandless. He’d grown up, I learned, in an affluent suburb of Washington, D.C., where he’d excelled academically and had been an elite athlete. Immediately after graduating, with honors, from Emory University in the summer of 1990, McCandless dropped out of sight. He changed his name, gave the entire balance of a twenty-four-thousand-dollar savings account to charity, abandoned his car and most of his possessions, burned all the cash in his wallet. And then he invented a new life for himself, taking up residence at the ragged margin of our society, wandering across North America in search of raw, transcendent experience experience experience experience exp."
            };

            // Act
            var devidedContentList = _bookHelper.DivideBook(book.Content);

            // Assert
            Assert.Equal("In April 1992, a young man from a well-to-do East Coast family hitchhiked to Alaska and walked alone into the wilderness north of Mt. McKinley. Four months later his decomposed body was found by a party of moose hunters.", devidedContentList[0]);
            Assert.Equal("Shortly after the discovery of the corpse, I was asked by the editor of Outside magazine to report on the puzzling circumstances of the boy’s death. His name turned out to be Christopher Johnson McCandless.", devidedContentList[1]);
            Assert.Equal("He’d grown up, I learned, in an affluent suburb of Washington, D.C., where he’d excelled academically and had been an elite athlete. Immediately after graduating, with honors, from Emory University in the summer of 1990, McCandless dropped out of sight.", devidedContentList[2]);
            Assert.Equal("He changed his name, gave the entire balance of a twenty-four-thousand-dollar savings account to charity, abandoned his car and most of his possessions, burned all the cash in his wallet. And then he invented a new life for himself, taking up residence at the ragged margin of our society, wandering across North America in search of raw, transcendent experience experience experience experience exp.", devidedContentList[3]);
        }