Exemple #1
0
        public void GetFolderByName_UnexistingFolderInRoot_IsNotFoundByNameIncludingSubDirs()
        {
            // Arrange
            TestSources testSources = new TestSources();
            string      folderName  = "IDoNotExist";
            // Act
            ITestSourceItem testSourcesItem = testSources.GetFolderByName(folderName, true);

            // Assert
            testSourcesItem.Should().BeNull();
        }
        public void GetByName_UnexistingFileInRoot_IsNotFoundByNameIncludingSubDirs()
        {
            // Arrange
            string fileName = "IDoNotExist.ext";

            // Act
            ITestSourceItem testSourcesItem = TestSource.GetByName(fileName, true);

            // Assert
            testSourcesItem.Should().BeNull();
        }
        public void GetByName_FileInSubFolder_IsFoundByNameWithSubDirsExplicit()
        {
            // Arrange
            string fileName = "SomeJson.json";

            // Act
            ITestSourceItem testSourcesItem = TestSource.GetByName(fileName, true);

            // Assert
            testSourcesItem.Should().NotBeNull();
            testSourcesItem.Name.Should().Be(fileName);
        }