Exemplo n.º 1
0
        public void ShouldMatchShorter()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("Bo"));
            Assert.IsTrue(nameBase.Matches("B"));
        }
Exemplo n.º 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"));
        }
Exemplo n.º 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"));
        }
Exemplo n.º 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"));
        }
Exemplo n.º 5
0
        public void NameBaseShouldMatchWithoutAdjective()
        {
            NameBase nameBase = new NameBase("Red Bob");

            Assert.IsTrue(nameBase.Matches("Bob"));
        }
Exemplo n.º 6
0
        public void ShouldMatchItself()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("Bob"));
        }
Exemplo n.º 7
0
        public void NameBaseShouldMatchExclaimation()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("bob!"));
        }
Exemplo n.º 8
0
        public void NameBaseShouldMatchOddCasing()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("bOB"));
        }
Exemplo n.º 9
0
        public void NameBaseShouldMatchLowerCase()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("bo"));
        }
Exemplo n.º 10
0
        public void ShouldNotMatchLonger()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsFalse(nameBase.Matches("Bobs"));
        }
Exemplo n.º 11
0
        public void ShouldMatchDefiniteSelf()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("the Bob"));
        }
Exemplo n.º 12
0
        public void NameBaseShouldNotMatchWitIncorrectAdjective()
        {
            NameBase nameBase = new NameBase("Red Bob");

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