Exemplo n.º 1
0
        public async Task GetEventListAsync_LoadLootThenMapTheResponse()
        {
            const int groupId       = 8;
            var       loots         = new List <Loot>();
            var       lootsResponse = new List <LootResponse>();

            _lootService.GetLootsForGroupAsync(_executionContext, groupId)
            .Returns(loots);
            _mapper.Map <List <LootResponse> >(loots)
            .Returns(lootsResponse);

            var result = await _controller.GetLootListAsync(_executionContext, groupId);

            result.Value.Should().BeSameAs(lootsResponse);
        }