public void removeInvalidClientAction() { //Arrange DataBaseContext db = new DataBaseContext(); IClientActionRepository clientActionRepo = new ClientActionRepository(db); Guid clientID = new Guid("6DF91B37-DC4A-E911-8259-0A64F53465D0"); string action = "Search"; ClientAction ca = new ClientAction(clientID, action); //Act => Assert Assert.ThrowsException <InvalidOperationException>(() => clientActionRepo.RemoveClientAction(ca)); }
public void removeValidClientAction() { //Arrange DataBaseContext db = new DataBaseContext(); IClientActionRepository clientActionRepo = new ClientActionRepository(db); Guid clientID = new Guid("6DF91B37-DC4A-E911-8259-0A64F53465D0"); string action = "Search"; ClientAction ca = clientActionRepo.GetClientAction(clientID, action); //Act clientActionRepo.RemoveClientAction(ca); ClientAction removedCA = clientActionRepo.GetClientAction(clientID, action); //Assert Assert.IsNull(removedCA); }
public void ClientRepository_RemoveClientAction_ValidClientAction() { //Arrange DataBaseContext db = new DataBaseContext(); IClientActionRepository clientActionRepo = new ClientActionRepository(db); Guid clientID = new Guid("41361F37-036B-E911-AA03-021598E9EC9E"); string action = "Search"; ClientAction ca = clientActionRepo.GetClientAction(clientID, action); //Act clientActionRepo.RemoveClientAction(ca); ClientAction removedCA = clientActionRepo.GetClientAction(clientID, action); //Assert Assert.IsNull(removedCA); }