public async Task ADD_GivenANewUriLocation_CreateIt() { //Arrange UriLocation newUriLocation = new UriLocation { Location = "www.google.co.uk", CreateDateTime = DateTime.Now, CreatedByAuthor = "Eileen Hunter", ModifiedBy = "Eileen Hunter", ModifiedDateTime = DateTime.Now }; //Act var result = repository.Add(newUriLocation); await repository.CommitAsync(); //Assert Assert.IsInstanceOfType(result, typeof(UriLocation)); }
public void UPDATE_GivenAnExistingUriLocation_UpdateTheLocationUri() { //Arrange UriLocation existingUriLocation = new UriLocation { Id = 4, Location = "www.bbc.co.uk", ModifiedBy = "Terry McPherson", ModifiedDateTime = DateTime.Now, CreateDateTime = DateTime.Now, CreatedByAuthor = "Eileen Hunter" }; //Act var result = repository.Update<UriLocation>(existingUriLocation); repository.Commit(); //Assert Assert.IsInstanceOfType(result, typeof(UriLocation)); Assert.IsNotNull(result); }