public void UpdateGroup_when_group_is_found_updates_group_title() { //arrange var originalGroup = new Group() { Id = 1, Title = "title" }; var groupToUpdate = new Group() { Id = 1, Title = "updatedTitle" }; _repositoryGroup.Add(originalGroup); var mut = new UserAdminService(_provider); //act mut.UpdateGroup(groupToUpdate); var result = _repositoryGroup.GetQuery().First(x => x.Id == 1); //assert Assert.AreEqual("updatedTitle", result.Title); //cleanup }
public void UpdateGroup_when_group_is_found_updates_group_Description() { //arrange var originalGroup = new Group() { Id = 1, Description = "description" }; var groupToUpdate = new Group() { Id = 1, Description = "updateddescription" }; _repositoryGroup.Add(originalGroup); var mut = new UserAdminService(_provider); //act mut.UpdateGroup(groupToUpdate); var result = _repositoryGroup.GetQuery().First(x => x.Id == 1); //assert Assert.AreEqual("updateddescription", result.Description); //cleanup _repositoryGroup.Delete(originalGroup); }