예제 #1
0
        public void getAllStoreRolesOfAUser()
        {
            User  itamar = new User("checker", "123456");
            Store s      = sa.addStore("vadim and sons", itamar);
            User  temp   = new User("Vadim", "Vadim");

            Assert.IsTrue(sa.addStoreRole(new StoreManager(temp, s), s.getStoreId(), "Vadim"));
            Store s2 = sa.addStore("vadim and sons2", itamar);

            Assert.IsTrue(sa.addStoreRole(new StoreManager(temp, s2), s2.getStoreId(), "Vadim"));
            Assert.AreEqual(2, sa.getAllStoreRolesOfAUser(temp.getUserName()).Count);
        }