public RefreshTokenCreateCommandHandlerTests() { var fixture = new Fixture(); _testCommand = fixture.Create <RefreshTokenCreateCommand>(); _writeContext = InitializeDatabase(); _handler = new RefreshTokenCreateCommandHandler(_writeContext); }
public WishCreateCommandHandlerTests() { var fixture = new Fixture(); _testCommand = fixture.Create <WishCreateCommand>(); _writeContext = InitializeDatabase(); _handler = new WishCreateCommandHandler(_writeContext); }
public RefreshTokenClearExpiredForUserCommandHandlerTests() { _fixture = new Fixture(); _fixture.Behaviors.Add(new OmitOnRecursionBehavior()); _context = InitializeDatabase(); _testCommand = _fixture.Create <RefreshTokenClearExpiredForUserCommand>(); _handler = new RefreshTokenClearExpiredForUserCommandHandler(_context); }
public WishCompleteItemCommandHandlerTests() { var fixture = new Fixture(); fixture.Behaviors.Add(new OmitOnRecursionBehavior()); _testRecord = fixture.Create <WishRecord>(); _testCommand = new WishCompleteItemCommand(_testRecord.User.Id, _testRecord.Id); _writeContext = InitializeDatabase(); _handler = new WishCompleteItemCommandHandler(_writeContext); }
public WishDeleteCommandHandlerTests() { var fixture = new Fixture(); fixture.Behaviors.Add(new OmitOnRecursionBehavior()); _context = InitializeDatabase(); _testCommand = fixture.Create <WishDeleteCommand>(); _testRecord = fixture .Build <WishRecord>() .With(w => w.Id, _testCommand.Id) .With(w => w.User, _testCommand.User) .With(w => w.UserId, _testCommand.User.Id) .Create(); _handler = new WishDeleteCommandHandler(_context); }
public BookAddToShowcaseCommandHandlerTests() { _fixture = new Fixture(); _fixture.Behaviors.Add(new OmitOnRecursionBehavior()); _context = InitializeDatabase(); _testCommand = _fixture.Create <BookAddToShowcaseCommand>(); _testBook = _fixture .Build <BookRecord>() .With(a => a.Id, _testCommand.BookId) .With(a => a.IsShowcased, false) .With(a => a.UpdatedOn, DateTimeOffset.UtcNow) .With(a => a.User, _testCommand.User) .With(a => a.UserId, _testCommand.User.Id) .Create(); _handler = new BookAddToShowcaseCommandHandler(_context); }
public BookUpdateCommandHandlerTests() { _fixture = new Fixture(); _fixture.Behaviors.Add(new OmitOnRecursionBehavior()); _context = InitializeDatabase(); _testCommand = CreateTestCommand( Guid.NewGuid(), CompletionStatusReference.Completed, false, false, 1, Guid.NewGuid()); var checkout = _fixture .Build <CheckoutRecord>() .With(c => c.ModifiedOn, DateTimeOffset.UtcNow) .Create(); var itemStorage = _fixture .Build <ItemStorageRecord>() .With(a => a.ModifiedOn, DateTimeOffset.UtcNow) .Create(); _testBook = _fixture .Build <BookRecord>() .With(a => a.Id, _testCommand.BookId) .With(a => a.Author, _testCommand.Author) .With(a => a.Checkout, checkout) .With(a => a.UpdatedOn, DateTimeOffset.UtcNow) .With(a => a.ItemStorage, itemStorage) .With(a => a.Type, _testCommand.Type) .With(a => a.TimesCompleted, 1) .With(a => a.Title, _testCommand.Title) .With(a => a.User, _testCommand.User) .With(a => a.UserId, _testCommand.User.Id) .Create(); _handler = new BookUpdateCommandHandler(_context); }
public WishUpdateCommandHandlerTests() { _fixture = new Fixture(); _fixture.Behaviors.Add(new OmitOnRecursionBehavior()); _testRecord = _fixture.Create <WishRecord>(); _testCommand = new WishUpdateCommand( "api", "category", "image", true, ItemReference.Album, "note", "title", _testRecord.User.Id, _testRecord.Id); _writeContext = InitializeDatabase(); _handler = new WishUpdateCommandHandler(_writeContext); }
public AlbumSubmissionCommandHandlerTests() { _fixture = new Fixture(); _fixture.Behaviors.Add(new OmitOnRecursionBehavior()); _context = InitializeDatabase(); var config = new MapperConfiguration(x => { x.AddProfile <AlbumMappingProfile>(); x.AddProfile <CheckoutMappingProfile>(); x.AddProfile <ItemStorageMappingProfile>(); }); config.AssertConfigurationIsValid(); var mapper = new Mapper(config); _testCommand = CreateTestCommand(1, Guid.NewGuid()); _handler = new AlbumSubmissionCommandHandler(_context, mapper); }
public WishDeleteCommandHandler(IProjectDianaWriteContext context) => _context = context;
public GameSubmissionCommandHandler(IProjectDianaWriteContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public RefreshTokenCreateCommandHandler(IProjectDianaWriteContext context) => _context = context;
public GameIncrementPlayCountCommandHandler(IProjectDianaWriteContext context) => _context = context;
public AlbumClearShowcaseCommandHandler(IProjectDianaWriteContext context) => _context = context;
public RefreshTokenClearExpiredForUserCommandHandler(IProjectDianaWriteContext context) => _context = context;
public AlbumUpdateCommandHandler(IProjectDianaWriteContext context) => _context = context;
public BookIncrementReadCountCommandHandler(IProjectDianaWriteContext context) => _context = context;
public MovieAddToShowcaseCommandHandler(IProjectDianaWriteContext context) => _context = context;
public MovieRemoveFromShowcaseCommandHandler(IProjectDianaWriteContext context) => _context = context;