public async Task Handle_ReturnsCorrectNumberOfAttachments()
        {
            using var context = new IPOContext(_dbContextOptions, _plantProvider, _eventDispatcher, _currentUserProvider);
            var blobStorageMock = new Mock <IBlobStorage>();
            var query           = new GetAttachmentsQuery(1);
            var dut             = new GetAttachmentsQueryHandler(context, blobStorageMock.Object, _blobStorageOptionsMonitorMock.Object);

            var result = await dut.Handle(query, default);

            Assert.IsNotNull(result);
            Assert.AreEqual(2, result.Data.Count);
        }
Пример #2
0
 public void Setup() => _handler = new GetAttachmentsQueryHandler(_mapper, _wolkDbContext);