示例#1
0
            public void Create_10()
            {
                var inputAbsolute = "first/topic/none.jpg";
                var expected      = "first/topic/none.jpg";
                var created       = BCFv21Container.TransformToRelativePath(inputAbsolute, null);

                Assert.Equal(expected, created);
            }
示例#2
0
            public void Create_11()
            {
                var inputAbsolute   = "first/topic/none.jpg";
                var inputCurrentLoc = "some/other/folder/dir/hello";
                var expected        = "../../../../../first/topic/none.jpg";
                var created         = BCFv21Container.TransformToRelativePath(inputAbsolute, inputCurrentLoc);

                Assert.Equal(expected, created);
            }
示例#3
0
            public void Create_09()
            {
                var inputAbsolute   = "first/topic/none.jpg";
                var inputCurrentLoc = string.Empty;
                var expected        = "first/topic/none.jpg";
                var created         = BCFv21Container.TransformToRelativePath(inputAbsolute, inputCurrentLoc);

                Assert.Equal(expected, created);
            }
示例#4
0
            public void Create_07()
            {
                var inputAbsolute   = "totally/different/folder/none.jpg";
                var inputCurrentLoc = "some/other/structure";
                var expected        = "../../../totally/different/folder/none.jpg";
                var created         = BCFv21Container.TransformToRelativePath(inputAbsolute, inputCurrentLoc);

                Assert.Equal(expected, created);
            }
示例#5
0
            public void Create_06()
            {
                var inputAbsolute   = "someFolder/nested/none.jpg";
                var inputCurrentLoc = "someFolder/nested";
                var expected        = "none.jpg";
                var created         = BCFv21Container.TransformToRelativePath(inputAbsolute, inputCurrentLoc);

                Assert.Equal(expected, created);
            }
示例#6
0
            public void EmptyOnEmptyInput_04()
            {
                var created = BCFv21Container.TransformToRelativePath(string.Empty, string.Empty);

                Assert.True(string.IsNullOrWhiteSpace(created));
            }