public async Task DeletePhotoTest() { // Populate our db with necessary objects var user = await _repository.CreateUser("Test User " + DateTime.UtcNow.Ticks); var category = await _repository.CreateCategory("Test Category " + DateTime.UtcNow.Ticks); var photo = await _repository.InsertPhoto(CreateTestPhoto(category, user), 1); _userRegistrationReferenceProviderMock.GetCurrentUserRegistrationReference = () => user.RegistrationReference; await _photoController.DeleteAsync(photo.Id); // Act await _photoController.GetAsync(photo.Id); }