public void GetAllArtifacts_Returns200OK_WhenDBHasOneResource()
        {
            mockRepo.Setup(repo => repo.GetAllArtifacts()).Returns(GetArtifacts(1));

            var controller = new ArtifactController(mockRepo.Object, mapper);

            var result = controller.GetAllArtifacts();

            Assert.IsType <OkObjectResult>(result.Result);
        }
        public void GetAllArtifacts_ReturnsCorrectType_WhenDBHasOneResource()
        {
            mockRepo.Setup(repo => repo.GetAllArtifacts()).Returns(GetArtifacts(1));

            var controller = new ArtifactController(mockRepo.Object, mapper);

            var result = controller.GetAllArtifacts();

            Assert.IsType <ActionResult <IEnumerable <ArtifactReadDto> > >(result);
        }
        public void GetAllArtifacts_ReturnsOneResource_WhenDBHasOneResource()
        {
            mockRepo.Setup(repo => repo.GetAllArtifacts()).Returns(GetArtifacts(1));

            var controller = new ArtifactController(mockRepo.Object, mapper);

            var result = controller.GetAllArtifacts();

            var okResult = result.Result as OkObjectResult;

            var artifacts = okResult.Value as List <ArtifactReadDto>;

            Assert.Single(artifacts);
        }