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

            // Assert
            testSourcesItem.Should().BeNull();
        }
Beispiel #2
0
        public void GetFolderByName_FolderInRoot_IsNotFoundByNameInLowerCase()
        {
            // Arrange
            TestSources testSources = new TestSources();
            string      folderName  = "filecontenttests"; //FileContentTests
            // Act
            ITestSourceItem testSourcesItem = testSources.GetFolderByName(folderName, false);

            // Assert
            testSourcesItem.Should().BeNull();
        }
Beispiel #3
0
        public void GetFolderByName_FolderInFinalSubFolder_IsFoundByNameWithSubDirsImplicit()
        {
            // Arrange
            TestSources testSources = new TestSources();
            string      folderName  = "sub02";
            // Act
            ITestSourceItem testSourcesItem = testSources.GetFolderByName(folderName, true);

            // Assert
            testSourcesItem.Should().NotBeNull();
            testSourcesItem.Name.Should().Be(folderName);
        }
Beispiel #4
0
        public void GetFolderByName_FolderInRoot_IsFoundByNameIncludingSubDirs()
        {
            // Arrange
            TestSources testSources = new TestSources();
            string      folderName  = "FileContentTests";
            // Act
            ITestSourceItem testSourcesItem = testSources.GetFolderByName(folderName, true);

            // Assert
            testSourcesItem.Should().NotBeNull();
            testSourcesItem.Name.Should().Be(folderName);
        }
Beispiel #5
0
        public void GetFolderByName_FolderInRootAndFinalSubfolder_OnlyFirstFolderFileIsFound()
        {
            // Arrange
            TestSources testSources = new TestSources();
            string      folderName  = "sub01";
            // Act
            ITestSourceItem testSourcesItem = testSources.GetFolderByName(folderName, true);

            // Assert
            testSourcesItem.Should().NotBeNull();
            testSourcesItem.Name.Should().Be(folderName);
            testSourcesItem.Parent.Name.Should().Be(GetFolderByNameTests.rootpath);
        }