public void GetMakerSpaceById_NotExists(Guid id)
        {
            //Arrange

            //Act
            MakerSpaceReadDto result = null;

            //Assert
            Assert.Throws <NullReferenceException>(
                () => result = _service.GetMakerSpaceById(id));
            _repo.Verify(repo => repo.GetMakerSpaceById(id), Times.Once);
            Assert.Null(result);
        }
예제 #2
0
        public void GetMakerSpaceById_NotExists(Guid id)
        {
            //Arrange

            //Act
            MakerSpaceReadDto result = null;
            Action            act    = () => _service.GetMakerSpaceById(id);

            //Assert
            act.Should().Throw <NullReferenceException>();
            _repo.Verify(repo => repo.GetMakerSpaceById(id), Times.Once);
            result.Should().BeNull();
        }