Пример #1
0
        public void CheckIfFileIsAlreadyInList_FileIsNotInList_ReturnsFalse()
        {
            //Arrange
            var sut = new SearchEngine(".txt");

            //Act
            bool fileAlreadyInList = sut.CheckIfDuplicate(@"ExampleFiles\ValidTxtFile.txt");

            //Assert
            Assert.IsFalse(fileAlreadyInList);
        }
Пример #2
0
        public void CheckIfFileIsAlreadyInList_FileIsAlreadyInList_ReturnsTrue()
        {
            //Arrange
            var sut = new SearchEngine(".txt");

            //Act
            sut.TryAddFile(@"ExampleFiles\ValidTxtFile.txt", out string message, out TxtFile file);
            bool fileAlreadyInList = sut.CheckIfDuplicate(@"ExampleFiles\ValidTxtFile.txt");

            //Assert
            Assert.IsTrue(fileAlreadyInList);
        }