public async void SaveBook()
        {
            System.Diagnostics.Debugger.Launch();

            var options = new DbContextOptionsBuilder <DbContextBook>()
                          .UseInMemoryDatabase(databaseName: "db_books_test")
                          .Options;

            var context = new DbContextBook(options);


            New.RequestBook request = new New.RequestBook
            {
                Title           = "Microservices Book",
                PublicationDate = DateTime.Now,
                AuthorGuid      = Guid.Empty
            };

            New.Driver driver = new New.Driver(context);


            var result = await driver.Handle(request, new System.Threading.CancellationToken());

            Assert.True(result != null);
        }
예제 #2
0
 public ReturnController(DbContextBook context)
 {
     _context = context;
 }
 public Driver(DbContextBook Context, IMapper mapper)
 {
     _context = Context;
     _mapper  = mapper;
 }
예제 #4
0
 public BorrowController(DbContextBook context)
 {
     _context = context;
 }
 public PublisherController(DbContextBook context)
 {
     _context = context;
 }
예제 #6
0
 public AuthorController(DbContextBook context)
 {
     _context = context;
 }
예제 #7
0
 public Driver(DbContextBook context, IRabbitEventBuss rabbitEventBuss)
 {
     _context         = context;
     _rabbitEventBuss = rabbitEventBuss;
 }