public void TestAddID()
        {
            IdentifiableObject TestObject = new IdentifiableObject (new string[] {"fred", "bob"});

            TestObject.AddIdentifier ("wilma");

            Assert.IsTrue (TestObject.AreYou("fred"));
            Assert.IsTrue (TestObject.AreYou("bob"));
            Assert.IsTrue (TestObject.AreYou("wilma"));
        }
        public void TestAddID()
        {
            IdentifiableObject TestObject = new IdentifiableObject(new string[] { "fred", "bob" });

            TestObject.AddIdentifier("wilma");

            Assert.IsTrue(TestObject.AreYou("fred"));
            Assert.IsTrue(TestObject.AreYou("bob"));
            Assert.IsTrue(TestObject.AreYou("wilma"));
        }
Пример #3
0
        [Test] // Whether AreYou Method is ignoring casing when comparing identifiers
        public void TestAreYouCaseSensitive()
        {
            IdentifiableObject testIdentifiableObject = new IdentifiableObject(new string[] { "fred", "bob" });
            bool actual   = testIdentifiableObject.AreYou("fReD");
            bool expected = true;

            Assert.AreEqual(expected, actual, "AreYou() is exhibiting Case Sensitivity when casing should be ignored.");
        }
Пример #4
0
        [Test] // Whether AreYou Method is returning FALSE for negative match
        public void TestAreYouNot()
        {
            IdentifiableObject testIdentifiableObject = new IdentifiableObject(new string[] { "fred", "bob" });
            bool actual   = testIdentifiableObject.AreYou("andrew");
            bool expected = false;

            Assert.AreEqual(expected, actual, "AreYou() has returned a false positive");
        }
Пример #5
0
        [Test] // Whether AreYou Method is returning TRUE for positive match
        public void TestAreYou()
        {
            IdentifiableObject testIdentifiableObject = new IdentifiableObject(new string[] { "fred", "bob" });
            bool actual   = testIdentifiableObject.AreYou("fred");
            bool expected = true;

            Assert.AreEqual(expected, actual, "AreYou() is not identifying matches correctly.");
        }
Пример #6
0
        [Test] // Whether AddId will add passed identifier to the list
        public void AddIdentifierTest()
        {
            IdentifiableObject testIdentifiableObject = new IdentifiableObject(new string[] { "fred", "bob" });

            testIdentifiableObject.AddIdentifier("james");
            bool actual   = testIdentifiableObject.AreYou("james");
            bool expected = true;

            Assert.AreEqual(expected, actual, "AddIdentifier() has not added an Identifier to the list.");
        }
        public void TestAreYou()
        {
            IdentifiableObject TestObject = new IdentifiableObject (new string[] {"fred", "bob"});

            Assert.IsTrue (TestObject.AreYou("fred"));
            Assert.IsTrue (TestObject.AreYou("bob"));
            Assert.IsFalse (TestObject.AreYou("wilma"));
            Assert.IsFalse (TestObject.AreYou("boby"));
            Assert.IsFalse (TestObject.AreYou("Fred"));
            Assert.IsFalse (TestObject.AreYou("BOB"));
        }
        public void TestAreYou()
        {
            IdentifiableObject TestObject = new IdentifiableObject(new string[] { "fred", "bob" });

            Assert.IsTrue(TestObject.AreYou("fred"));
            Assert.IsTrue(TestObject.AreYou("bob"));
            Assert.IsFalse(TestObject.AreYou("wilma"));
            Assert.IsFalse(TestObject.AreYou("boby"));
            Assert.IsFalse(TestObject.AreYou("Fred"));
            Assert.IsFalse(TestObject.AreYou("BOB"));
        }
 public void TestYouAreNot()
 {
     IdentifiableObject id =new IdentifiableObject( new string[] { "id1", "id2" } );
     Assert.IsFalse(id.AreYou("id3"));
 }
 public void TestCaseSensitive()
 {
     IdentifiableObject id =new IdentifiableObject( new string[] { "id1", "id2" } );
     Assert.IsTrue(id.AreYou("ID1"));
 }
Пример #11
0
        public void TestAreYou()
        {
            bool actual = _testableObject.AreYou("bob");

            Assert.IsTrue(actual, "Calling are you");
        }
Пример #12
0
 public void TestAreYou()
 {
     Assert.IsTrue(_testObject.AreYou("fred"));
     Assert.IsTrue(_testObject.AreYou("bob"));
 }
Пример #13
0
        public void TestAreYou(string id)
        {
            var result = identobj.AreYou(id);

            Assert.IsTrue(result);
        }