Beispiel #1
0
        public void TestPlayerLocatesItself()
        {
            Player John = new Player("John", "Random Player");

            Assert.AreEqual(John, John.Locate("me"), "Test Player Locates itself");
            Assert.AreEqual(John, John.Locate("inventory"), "Test Player Locates itself");
        }
Beispiel #2
0
        public void TestPlayerLocatesItem()
        {
            Player John   = new Player("John", "Random Player");
            Item   shovel = new Item(new String [] { "shovel", "spade" }, "a shovel", "This is a might fine ...");

            John.Inventory.Put(shovel);
            Assert.AreEqual(shovel, John.Locate("shovel"), "Test Player Locates Item");
        }
Beispiel #3
0
        public void TestPlayerLocatesNothing()
        {
            Player John = new Player("John", "Random Player");

            Assert.AreEqual(null, John.Locate("nothing"), "Test Player Locates itself");
        }