Esempio n. 1
0
        public async Task Handle_ReturnsEmptyList_IfNoElementsAreFound()
        {
            _clientMock
            .Setup(x => x.QueryAndDeserializeAsync <List <MainApiFunctionalRole> >(It.IsAny <string>()))
            .Returns(Task.FromResult <List <MainApiFunctionalRole> >(null));

            var dut = new GetFunctionalRolesQueryHandler(_clientMock.Object, _optionsMonitorMock.Object);

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

            Assert.AreEqual(0, result.Data.Count());
        }
Esempio n. 2
0
        public async Task Handle_ReturnsOkResult()
        {
            var result = await _dut.Handle(_request, default);

            Assert.AreEqual(ResultType.Ok, result.ResultType);
        }