public void GetMakerSpaceById_Exists(Guid id)
        {
            //Arrange
            _repo.Setup(repo => repo.GetMakerSpaceById(id)).Returns(
                new MakerSpace()
            {
                MakerSpaceId = id
            }
                );

            //Act
            var result = _service.GetMakerSpaceById(id);

            //Assert
            _repo.Verify(repo => repo.GetMakerSpaceById(id), Times.Once);
            Assert.Equal(result.MakerSpaceId, id);
        }
Пример #2
0
        public void GetMakerSpaceById_Exists(Guid id)
        {
            //Arrange
            //Guid id = Guid.NewGuid();
            _repo.Setup(repo => repo.GetMakerSpaceById(id)).Returns(
                new MakerSpace()
            {
                MakerSpaceId = id
            }
                );

            //Act
            var result = _service.GetMakerSpaceById(id);

            //Assert
            _repo.Verify(repo => repo.GetMakerSpaceById(id), Times.Once);
            result.MakerSpaceId.Should().Be(id);
        }