public void CreateANewPhotograph() { var dbContextScopeFactory = new DbContextScopeFactory(); var ambientDbContextLocator = new AmbientDbContextLocator(); var photographRepository = new PhotographRepository(ambientDbContextLocator); var photographService = new PhotographServices(dbContextScopeFactory, photographRepository); //var userQueryService = new UserQueryService(dbContextScopeFactory, userRepository); //var userEmailService = new UserEmailService(dbContextScopeFactory); //var userCreditScoreService = new UserCreditScoreService(dbContextScopeFactory); Photograph newPhoto = new Photograph(); newPhoto.Location = "testlocation"; Assert.IsTrue(photographService.UploadPhotography(newPhoto)); Guid uploadID = newPhoto.PhotographId; Assert.IsTrue(photographService.RemovePhotography(newPhoto)); }
public void DeletePhotograph() { CreateANewPhotograph(); var dbContextScopeFactory = new DbContextScopeFactory(); var ambientDbContextLocator = new AmbientDbContextLocator(); var photographRepository = new PhotographRepository(ambientDbContextLocator); var photographService = new PhotographServices(dbContextScopeFactory, photographRepository); //var userQueryService = new UserQueryService(dbContextScopeFactory, userRepository); //var userEmailService = new UserEmailService(dbContextScopeFactory); //var userCreditScoreService = new UserCreditScoreService(dbContextScopeFactory); Assert.IsTrue(photographService.RemovePhotography((new Photograph { PhotographId = Guid.Empty }))); }