예제 #1
0
        public void RemoveStoreOwnerHimself()
        {
            zahiOwner.addStoreOwner(zahi, store, "shay");
            StoreRole shayOwner = new StoreOwner(shay, store);

            Assert.IsFalse(shayOwner.removeStoreOwner(shay, store, "shay") > -1);
            Assert.AreEqual(store.getOwners().Count, 2);
        }
예제 #2
0
        public void RemoveStoreOwnerTwice()
        {
            zahiOwner.addStoreOwner(zahi, store, "shay");
            StoreRole shayOwner = new StoreOwner(shay, store);

            zahiOwner.addStoreOwner(zahi, store, "aviad");
            Assert.AreEqual(store.getOwners().Count, 3);
            Assert.IsTrue(shayOwner.removeStoreOwner(zahi, store, "aviad") > -1);
            Assert.AreEqual(store.getOwners().Count, 2);
        }