Example #1
0
        public void GetMakerSpaceByName_Valid(string name)
        {
            _repo.Setup(repo => repo.GetMakerSpaceByName(name)).Returns(
                new MakerSpace()
            {
                MakerSpaceName = name
            }
                );
            var result = _service.GetMakerSpaceByName(name);

            _repo.Verify(repo => repo.GetMakerSpaceByName(name), Times.Once);
            result.MakerSpaceName.Should().Be(name);
        }
        public void GetMakerSpaceByName_Exists(string name)
        {
            _repo.Setup(repo => repo.GetMakerSpaceByName(name)).Returns(
                new MakerSpace()
            {
                MakerSpaceName = name
            }
                );

            var result = _service.GetMakerSpaceByName(name);

            _repo.Verify(repo => repo.GetMakerSpaceByName(name), Times.Once);
            Assert.Equal(result.MakerSpaceName, name);
        }