Beispiel #1
0
            public void Will_Not_Remove_WhiteSpace_Within_Path(string expected)
            {
                // Given, When
                var path = new TestingPath(expected);

                // Then
                path.FullPath.ShouldBe(expected);
            }
Beispiel #2
0
            public void Should_Remove_Trailing_Slashes(string value, string expected)
            {
                // Given, When
                var path = new TestingPath(value);

                // Then
                Assert.Equal(expected, path.FullPath);
            }
Beispiel #3
0
            public void Will_Trim_WhiteSpace_From_Path(string input, string expected)
            {
                // Given, When
                var path = new TestingPath(input);

                // Then
                Assert.Equal(expected, path.FullPath);
            }
Beispiel #4
0
            public void Should_Not_Remove_Trailing_Slash_For_Root()
            {
                // Given, When
                var path = new TestingPath("/");

                // Then
                path.FullPath.ShouldBe("/");
            }
Beispiel #5
0
            public void Will_Trim_WhiteSpace_From_Path()
            {
                // Given, When
                var path = new TestingPath(" shaders/basic ");

                // Then
                Assert.Equal("shaders/basic", path.FullPath);
            }
Beispiel #6
0
            public void Will_Not_Remove_WhiteSpace_Within_Path()
            {
                // Given, When
                var path = new TestingPath("my awesome shaders/basic");

                // Then
                Assert.Equal("my awesome shaders/basic", path.FullPath);
            }
Beispiel #7
0
            public void Will_Normalize_Path_Separators()
            {
                // Given, When
                var path = new TestingPath("shaders\\basic");

                // Then
                Assert.Equal("shaders/basic", path.FullPath);
            }
Beispiel #8
0
            public void Will_Not_Remove_WhiteSpace_Within_Path(string fullPath)
            {
                // Given, When
                var path = new TestingPath(fullPath);

                // Then
                Assert.Equal(fullPath, path.FullPath);
            }
Beispiel #9
0
            public void Will_Normalize_Path_Separators()
            {
                // Given, When
                var path = new TestingPath("shaders\\basic");

                // Then
                Assert.Equal("shaders/basic", path.FullPath);
            }
Beispiel #10
0
            public void Should_Return_The_Full_Path(string fullPath)
            {
                // Given, When
                var path = new TestingPath(fullPath);

                // Then
                Assert.Equal(fullPath, path.ToString());
            }
Beispiel #11
0
            public void Should_Return_The_Full_Path()
            {
                // Given, When
                var path = new TestingPath("temp/hello");

                // Then
                Assert.Equal("temp/hello", path.ToString());
            }
Beispiel #12
0
            public void Will_Not_Remove_WhiteSpace_Within_Path()
            {
                // Given, When
                var path = new TestingPath("my awesome shaders/basic");

                // Then
                Assert.Equal("my awesome shaders/basic", path.FullPath);
            }
Beispiel #13
0
            public void Should_Not_Remove_Trailing_Slash_For_UNC_Root()
            {
                // Given, When
                var path = new TestingPath(@"\\");

                // Then
                Assert.Equal(@"\\", path.FullPath);
            }
Beispiel #14
0
            public void Should_Return_Full_Path()
            {
                // Given, When
                var path = new TestingPath("shaders/basic");

                // Then
                path.FullPath.ShouldBe("shaders/basic");
            }
Beispiel #15
0
            public void Will_Trim_WhiteSpace_From_Path()
            {
                // Given, When
                var path = new TestingPath(" shaders/basic ");

                // Then
                Assert.Equal("shaders/basic", path.FullPath);
            }
Beispiel #16
0
            public void An_UNC_Path_Is_Always_Considered_To_Be_Absolute()
            {
                // Given, When
                var path = new TestingPath(@"\\foo\bar");

                // Then
                Assert.False(path.IsRelative);
            }
Beispiel #17
0
            public void Current_Directory_Returns_Empty_Path()
            {
                // Given, When
                var path = new TestingPath("./");

                // Then
                Assert.Equal(string.Empty, path.FullPath);
            }
Beispiel #18
0
            public void Will_Trim_WhiteSpace_From_Path(string input, string expected)
            {
                // Given, When
                var path = new TestingPath(input);

                // Then
                path.FullPath.ShouldBe(expected);
            }
Beispiel #19
0
            public void Will_Normalize_UNC_Path_Separators()
            {
                // Given, When
                var path = new TestingPath(@"\\foo/bar\qux");

                // Then
                Assert.Equal(@"\\foo\bar\qux", path.FullPath);
            }
Beispiel #20
0
            public void Will_Normalize_Path_Separators()
            {
                // Given, When
                var path = new TestingPath("shaders\\basic");

                // Then
                path.FullPath.ShouldBe("shaders/basic");
            }
Beispiel #21
0
            public void Will_Normalize_UNC_Path_Separators()
            {
                // Given, When
                var path = new TestingPath(@"\\foo/bar\qux");

                // Then
                path.FullPath.ShouldBe(@"\\foo\bar\qux");
            }
Beispiel #22
0
            public void Should_Return_The_Full_Path(string expected)
            {
                // Given, When
                var path = new TestingPath(expected);

                // Then
                path.ToString().ShouldBe(expected);
            }
Beispiel #23
0
            public void Should_Return_Whether_Or_Not_A_Path_Is_Relative(string fullPath, bool expected)
            {
                // Given, When
                var path = new TestingPath(fullPath);

                // Then
                path.IsRelative.ShouldBe(expected);
            }
Beispiel #24
0
            public void Current_Directory_Returns_Empty_Path()
            {
                // Given, When
                var path = new TestingPath("./");

                // Then
                path.FullPath.ShouldBeEmpty();
            }
Beispiel #25
0
            public void Should_Return_Whether_Or_Not_A_Path_Is_Relative_On_Windows(string fullPath, bool expected)
            {
                // Given, When
                var path = new TestingPath(fullPath);

                // Then
                Assert.Equal(expected, path.IsRelative);
            }
Beispiel #26
0
            public void Current_Directory_Returns_Empty_Path()
            {
                // Given, When
                var path = new TestingPath("./");

                // Then
                Assert.Equal(string.Empty, path.FullPath);
            }
Beispiel #27
0
            public void Should_Return_Full_Path()
            {
                // Given, When
                var path = new TestingPath("shaders/basic");

                // Then
                Assert.Equal("shaders/basic", path.FullPath);
            }
Beispiel #28
0
            public void Should_Return_Full_Path()
            {
                // Given, When
                const string expected = "shaders/basic";
                var          path     = new TestingPath(expected);

                // Then
                Assert.Equal(expected, path.FullPath);
            }
Beispiel #29
0
            public void Should_Return_Segments_Of_Path_And_Leave_Absolute_Directory_Separator_Intact(string pathName)
            {
                // Given
                var path = new TestingPath(pathName);

                // When, Then
                Assert.Equal(2, path.Segments.Length);
                Assert.Equal("/Hello", path.Segments[0]);
                Assert.Equal("World", path.Segments[1]);
            }
Beispiel #30
0
            public void Should_Return_Segments_Of_Path(string pathName)
            {
                // Given
                var path = new TestingPath(pathName);

                // When, Then
                Assert.Equal(2, path.Segments.Length);
                Assert.Equal("Hello", path.Segments[0]);
                Assert.Equal("World", path.Segments[1]);
            }
Beispiel #31
0
            public void Should_Return_Segments_Of_Path(string pathName)
            {
                // Given
                var path = new TestingPath(pathName);

                // When, Then
                path.Segments.Count.ShouldBe(2);
                path.Segments[0].ShouldBe("Hello");
                path.Segments[1].ShouldBe("World");
            }
Beispiel #32
0
            public void Should_Return_Segments_Of_Path_And_Leave_Absolute_Directory_Separator_Intact(string pathName)
            {
                // Given
                var path = new TestingPath(pathName);

                // When, Then
                path.Segments.Count.ShouldBe(2);
                path.Segments[0].ShouldBe("/Hello");
                path.Segments[1].ShouldBe("World");
            }
Beispiel #33
0
            public void Should_Return_Whether_Or_Not_A_Path_Is_An_UNC_Path(string pathName, bool expected)
            {
                // Given
                var path = new TestingPath(pathName);

                // When
                var result = path.IsUNC;

                // Then
                Assert.Equal(expected, result);
            }
Beispiel #34
0
            public void Should_Return_Whether_Or_Not_A_Path_Is_Relative(string fullPath, bool expected)
            {
                // Given, When
                var path = new TestingPath(fullPath);

                // Then
                Assert.Equal(expected, path.IsRelative);
            }
Beispiel #35
0
        public void Should_Return_The_Full_Path()
        {
            var path = new TestingPath("temp/hello");

            Assert.That(path.ToString(), Is.EqualTo("temp/hello"));
        }
Beispiel #36
0
            public void Should_Return_Segments_Of_Path(string pathName)
            {
                // Given
                var path = new TestingPath("Hello/World");

                // When, Then
                Assert.Equal(2, path.Segments.Length);
                Assert.Equal("Hello", path.Segments[0]);
                Assert.Equal("World", path.Segments[1]);
            }
Beispiel #37
0
            public void Should_Return_The_Full_Path()
            {
                // Given, When
                var path = new TestingPath("temp/hello");

                // Then
                Assert.Equal("temp/hello", path.ToString());
            }
Beispiel #38
0
            public void Should_Remove_Trailing_Slashes(string value, string expected)
            {
                // Given, When
                var path = new TestingPath(value);

                // Then
                Assert.Equal(expected, path.FullPath);
            }
Beispiel #39
0
            public void Should_Return_Full_Path()
            {
                // Given, When
                const string expected = "shaders/basic";
                var path = new TestingPath(expected);

                // Then
                Assert.Equal(expected, path.FullPath);
            }