示例#1
0
        public void AddDocIDByAuthorTest_InputExceptionWithSpace()
        {
            //Arrange
            DiskSoundEx authorIndex = new DiskSoundEx("./");

            //Act
            authorIndex.AddDocIdByAuthor(" sella", 1);
            authorIndex.AddDocIdByAuthor("sella  ", 2);
            authorIndex.AddDocIdByAuthor("yashua  ovando", 2);
            authorIndex.AddDocIdByAuthor(" yashua     ovando     ", 3);
            authorIndex.Save();
            //Assert
            authorIndex.GetSoundexVocab().Should().HaveCount(3);
            authorIndex.Clear();
        }
示例#2
0
        public void AddDocIDByAuthorTest()
        {
            //Arrange
            DiskSoundEx authorIndex = new DiskSoundEx("./");

            //Act
            authorIndex.AddDocIdByAuthor("sella", 1);
            authorIndex.AddDocIdByAuthor("selly", 2);
            authorIndex.AddDocIdByAuthor("yashua", 3);
            authorIndex.AddDocIdByAuthor("yoshi", 4);
            authorIndex.AddDocIdByAuthor("yesh", 5);
            authorIndex.Save();

            //Assert
            authorIndex.GetSoundexVocab().Should().HaveCount(2);
            authorIndex.Get("S440").Should().HaveCount(2);
            authorIndex.Get("Y200").Should().HaveCount(3);

            authorIndex.Clear();
        }