Exemple #1
0
            public Enumerator(PathTokenizer tokenizer)
            {
                _path = tokenizer._path;

                _index  = -1;
                _length = -1;
            }
Exemple #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);
        }
Exemple #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]);
            }
        }
Exemple #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);
        }