예제 #1
0
        public void TryReadDotAtom_EndsInDot_ShouldReadCorrectly()
        {
            int index = ValidDotAtomEndsInDot.Length - 1;

            Assert.True(DotAtomReader.TryReadReverse(ValidDotAtomEndsInDot, index, out index, throwExceptionIfFail: true));

            Assert.Equal(-1, index);
        }
예제 #2
0
        public void TryReadDotAtom_WithValidDotAtomAndDoubleDots_ShouldReadCorrectly()
        {
            int index = ValidDotAtomDoubleDots.Length - 1;

            Assert.True(DotAtomReader.TryReadReverse(ValidDotAtomDoubleDots, index, out index, throwExceptionIfFail: true));

            Assert.Equal(0, index);
        }
예제 #3
0
        public void ReadDotAtom_EndsInDot_ShouldReadCorrectly()
        {
            int index = ValidDotAtomEndsInDot.Length - 1;

            index = DotAtomReader.ReadReverse(ValidDotAtomEndsInDot, index);

            Assert.Equal(-1, index);
        }
예제 #4
0
        public void ReadDotAtom_WithValidDotAtomAndDoubleDots_ShouldReadCorrectly()
        {
            int index = ValidDotAtomDoubleDots.Length - 1;

            index = DotAtomReader.ReadReverse(ValidDotAtomDoubleDots, index);

            Assert.Equal(0, index);
        }
예제 #5
0
        public void TryReadDotAtom_WithDotAtBeginning_ShouldThrow()
        {
            int index = InvalidDotAtomStartsWithDot.Length - 1;

            Assert.Throws <FormatException>(() => { DotAtomReader.TryReadReverse(InvalidDotAtomStartsWithDot, index, out int _, throwExceptionIfFail: true); });
        }
예제 #6
0
        public void ReadDotAtom_WithDotAtBeginning_ShouldThrow()
        {
            int index = InvalidDotAtomStartsWithDot.Length - 1;

            Assert.Throws <FormatException>(() => { DotAtomReader.ReadReverse(InvalidDotAtomStartsWithDot, index); });
        }