public void Constructor_ShouldSetProperties()
        {
            // Act
            var dut = new GetActionAttachmentQuery(1, 2, 3);

            // Assert
            Assert.AreEqual(1, dut.TagId);
            Assert.AreEqual(2, dut.ActionId);
            Assert.AreEqual(3, dut.AttachmentId);
        }
Beispiel #2
0
        public async Task Handler_ShouldReturnNotFound_IfActionIsNotFound()
        {
            await using var context = new PreservationContext(_dbContextOptions, _plantProvider, _eventDispatcher, _currentUserProvider);

            var query = new GetActionAttachmentQuery(_tagId, _actionId, 0);
            var dut   = new GetActionAttachmentQueryHandler(context, _blobStorageMock.Object, _attachmentOptionsMock.Object);

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

            Assert.IsNotNull(result);
            Assert.AreEqual(ResultType.NotFound, result.ResultType);
            Assert.IsNull(result.Data);
        }