public void Update() { UnityResolver.Register(); IBranchManager BranchManager = UnityResolver.Resolve <IBranchManager>(); Branch branch = BranchManager.FindById(91); branch.Address = "Panadura" + DateTime.Now.ToString(); bool isUpdate = BranchManager.Update(branch); BranchManager.Save(); Branch branch1 = BranchManager.FindById(93); string expected = "Panadura"; string actual = branch1.Address; Assert.AreEqual(expected, actual); }
public void FindById() { UnityResolver.Register(); IBranchManager BranchManager = UnityResolver.Resolve <IBranchManager>(); Branch branch1 = BranchManager.FindById(93); int expected = 93; int actual = branch1.BranchId; Assert.AreEqual(expected, actual); }