Ejemplo n.º 1
0
        public async Task SplitPath_Nothing_EmptyPath()
        {
            var expected = new List <List <char> >();

            CollectionAssert.AreEqual(expected, await ABSRegistry.SplitPathAsync(""));
            CollectionAssert.AreEqual(expected, await ABSRegistry.SplitPathAsync(new char[0]));
        }
Ejemplo n.º 2
0
        public async Task SplitPath_RootOnly_EmptyPath()
        {
            var expected = new List <List <char> >();

            CollectionAssert.AreEqual(expected, await ABSRegistry.SplitPathAsync("/"));
            CollectionAssert.AreEqual(expected, await ABSRegistry.SplitPathAsync(new char[] { '/' }));
            CollectionAssert.AreEqual(expected, await ABSRegistry.SplitPathAsync("\\"));
            CollectionAssert.AreEqual(expected, await ABSRegistry.SplitPathAsync(new char[] { '\\' }));
        }
Ejemplo n.º 3
0
        public async Task SplitPath_GroupInRoot()
        {
            var expected = new List <List <char> >()
            {
                new List <char>()
                {
                    'A', 'B', 'P', 'a', 'i', 'n', 't'
                }
            };

            Assert.IsTrue(TestArr(expected, await ABSRegistry.SplitPathAsync("ABPaint")));
            Assert.IsTrue(TestArr(expected, await ABSRegistry.SplitPathAsync("/ABPaint")));
            Assert.IsTrue(TestArr(expected, await ABSRegistry.SplitPathAsync("\\ABPaint")));
        }
Ejemplo n.º 4
0
        public async Task SplitPath_MultipleParts()
        {
            var expected = new List <List <char> >()
            {
                new List <char>()
                {
                    'A', 'B', 'P', 'a', 'i', 'n', 't'
                },
                new List <char>()
                {
                    'N', 'e', 'x', 't'
                },
                new List <char>()
                {
                    'A', 'n', 'o', 't', 'h', 'e', 'r'
                }
            };

            Assert.IsTrue(TestArr(expected, await ABSRegistry.SplitPathAsync("ABPaint/Next/Another")));
            Assert.IsTrue(TestArr(expected, await ABSRegistry.SplitPathAsync("/ABPaint/Next/Another")));
            Assert.IsTrue(TestArr(expected, await ABSRegistry.SplitPathAsync("ABPaint\\Next\\Another")));
            Assert.IsTrue(TestArr(expected, await ABSRegistry.SplitPathAsync("\\ABPaint\\Next\\Another")));
        }