public async Task CreateStore() { var request = new CreateStoreCommand("Vinbutik"); var handler = new StoreCommandHandler(_unitOfWork, _repository); var result = await handler.Handle(request, CancellationToken.None); Assert.AreEqual(true, result); }
public override void Observe() { base.RefreshDb(); _repository = new Repository<Command>(Session); var createDataProvider = new CreateDataProvider(Guid.NewGuid(), DataProviderName.LSAutoSpecs_I_DB, 0m, "Owner", DateTime.UtcNow); var command = new StoreCommand(Guid.NewGuid(), createDataProvider); _handler = new StoreCommandHandler(_repository); _handler.Handle(command); Session.Flush(); }