public void AddCategorySuccess() { AddCategorySlave slave = new AddCategorySlave(handler.Object, adminValidatorMocker.Object); slave.AddCategory("items"); Assert.AreEqual((int)StoreEnum.Success, slave.Answer.Status); }
public void AddCategoryWhenCategoryAlreadyExists() { AddCategorySlave slave = new AddCategorySlave(handler.Object, adminValidatorMocker.Object); handler.Setup(x => x.GetCategoryByName("items")).Returns(new Category("items")); slave.AddCategory("items"); Assert.AreEqual((int)EditCategoryStatus.CategoryAlradyExist, slave.Answer.Status); }