public async Task GenerateTest_ShouldReturnTest()
        {
            var result = await controller.GenerateTest(testQuery, default(CancellationToken));

            result.Result.Should().BeOfType <OkObjectResult>();
            (result.Result as OkObjectResult).Value.Should().BeOfType <TestDto>();
        }
Example #2
0
        public async Task GenerateTest_ForNonExistentCollection_ShouldReturnNotFound()
        {
            A.CallTo(() => storage.FindCollection(A <Guid> ._, default(CancellationToken)))
            .Returns <Collection>(null);

            var result = await controller.GenerateTest(
                new TestQueryDto(id, new TestBlockDto[0].ToList(), null), default(CancellationToken));

            result.Result.Should().BeOfType <NotFoundResult>();
        }