예제 #1
0
        public void ShouldMatchShorter()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("Bo"));
            Assert.IsTrue(nameBase.Matches("B"));
        }
예제 #2
0
        public void NameBaseShouldNotMatchWithIncorrectPostAdjectives()
        {
            NameBase nameBase = new NameBase("Bob", "the fourth");

            Assert.IsFalse(nameBase.Matches("Bob the fourth minion"));
            Assert.IsFalse(nameBase.Matches("Bob fourthh"));
            Assert.IsFalse(nameBase.Matches("bob minion fOuRth"));
            Assert.IsFalse(nameBase.Matches("bob minion the fOuR"));
        }
예제 #3
0
        public void NameBaseShouldMatchWithUsedPostAdjectives()
        {
            NameBase nameBase = new NameBase("Bob", "the fourth");

            Assert.IsTrue(nameBase.Matches("Bob the fourth"));
            Assert.IsTrue(nameBase.Matches("Bob fourth"));
            Assert.IsTrue(nameBase.Matches("bob fOuRth"));
            Assert.IsTrue(nameBase.Matches("bob fOuR"));
        }
예제 #4
0
        public void NameBaseShouldMatchWithCorrectAdjective()
        {
            NameBase nameBase = new NameBase("Red Bob");

            Assert.IsTrue(nameBase.Matches("Red Bob"));
            Assert.IsTrue(nameBase.Matches("red Bob"));
            Assert.IsTrue(nameBase.Matches("Re Bob"));
            Assert.IsTrue(nameBase.Matches("re Bob"));
            Assert.IsTrue(nameBase.Matches("R Bob"));
            Assert.IsTrue(nameBase.Matches("r Bob"));
            Assert.IsTrue(nameBase.Matches("r b"));
        }
예제 #5
0
        public void NameBaseShouldMatchWithoutAdjective()
        {
            NameBase nameBase = new NameBase("Red Bob");

            Assert.IsTrue(nameBase.Matches("Bob"));
        }
예제 #6
0
        public void ShouldMatchItself()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("Bob"));
        }
예제 #7
0
        public void NameBaseShouldMatchExclaimation()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("bob!"));
        }
예제 #8
0
        public void NameBaseShouldMatchOddCasing()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("bOB"));
        }
예제 #9
0
        public void NameBaseShouldMatchLowerCase()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("bo"));
        }
예제 #10
0
        public void ShouldNotMatchLonger()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsFalse(nameBase.Matches("Bobs"));
        }
예제 #11
0
        public void ShouldMatchDefiniteSelf()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("the Bob"));
        }
예제 #12
0
        public void NameBaseShouldNotMatchWitIncorrectAdjective()
        {
            NameBase nameBase = new NameBase("Red Bob");

            Assert.IsFalse(nameBase.Matches("Blue Bob"));
        }