public DeleteApiKeyHandlerTests() { _uow = ConnectionFactory.Create(); GetApplicationId(); _existingEntity = new ApiKey { ApplicationName = "Arne", GeneratedKey = Guid.NewGuid().ToString("N"), SharedSecret = Guid.NewGuid().ToString("N"), CreatedById = 20, CreatedAtUtc = DateTime.UtcNow }; _existingEntity.Add(_applicationId); var repos = new ApiKeyRepository(_uow); repos.CreateAsync(_existingEntity).Wait(); }
public DeleteApiKeyHandlerTests(ITestOutputHelper helper) : base(helper) { GetApplicationId(); _existingEntity = new ApiKey { ApplicationName = "Arne", GeneratedKey = Guid.NewGuid().ToString("N"), SharedSecret = Guid.NewGuid().ToString("N"), CreatedById = 20, CreatedAtUtc = DateTime.UtcNow }; _existingEntity.Add(_applicationId); using (var uow = CreateUnitOfWork()) { var repos = new ApiKeyRepository(uow); repos.CreateAsync(_existingEntity).GetAwaiter().GetResult(); uow.SaveChanges(); } }