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"));
        }
Exemplo n.º 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.");
        }
Exemplo n.º 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");
        }
Exemplo n.º 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.");
        }
Exemplo n.º 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"));
 }
Exemplo n.º 10
0
 public void TestCaseSensitive()
 {
     IdentifiableObject id =new IdentifiableObject( new string[] { "id1", "id2" } );
     Assert.IsTrue(id.AreYou("ID1"));
 }
Exemplo n.º 11
0
        public void TestAreYou()
        {
            bool actual = _testableObject.AreYou("bob");

            Assert.IsTrue(actual, "Calling are you");
        }
Exemplo n.º 12
0
 public void TestAreYou()
 {
     Assert.IsTrue(_testObject.AreYou("fred"));
     Assert.IsTrue(_testObject.AreYou("bob"));
 }
Exemplo n.º 13
0
        public void TestAreYou(string id)
        {
            var result = identobj.AreYou(id);

            Assert.IsTrue(result);
        }