Exemplo n.º 1
0
            public Enumerator(PathTokenizer tokenizer)
            {
                _path = tokenizer._path;

                _index  = -1;
                _length = -1;
            }
Exemplo n.º 2
0
        public void PathTokenizer_Enumerator(string path, StringSegment[] expectedSegments)
        {
            // Arrange
            var tokenizer = new PathTokenizer(new PathString(path));

            // Act & Assert
            Assert.Equal <StringSegment>(expectedSegments, tokenizer);
        }
Exemplo n.º 3
0
        public void PathTokenizer_Indexer(string path, StringSegment[] expectedSegments)
        {
            // Arrange
            var tokenizer = new PathTokenizer(new PathString(path));

            // Act & Assert
            for (var i = 0; i < expectedSegments.Length; i++)
            {
                Assert.Equal(expectedSegments[i], tokenizer[i]);
            }
        }
Exemplo n.º 4
0
        public void PathTokenizer_Count(string path, StringSegment[] expectedSegments)
        {
            // Arrange
            var tokenizer = new PathTokenizer(new PathString(path));

            // Act
            var count = tokenizer.Count;

            // Assert
            Assert.Equal(expectedSegments.Length, count);
        }