Beispiel #1
0
        public void ShouldNotDec()
        {
            StringIncrementer s;

            s = new StringIncrementer();

            Assert.ThrowsException <ArgumentOutOfRangeException>(() => s.Dec(null));
            Assert.ThrowsException <ArgumentOutOfRangeException>(() => s.Dec(Token.MinStringValue));
        }
Beispiel #2
0
        public void ShouldDec()
        {
            StringIncrementer s;

            s = new StringIncrementer();

            Assert.AreEqual("a", s.Dec("b"));
            Assert.AreEqual("aa", s.Dec("ab"));
            Assert.AreEqual(string.Empty, s.Dec("\0"));
            Assert.AreEqual("\uFFFF", s.Dec("\uFFFF\u0000"));
        }