public void When_I_Call_GetServerPark_Then_The_Correct_Service_Method_Is_Called() { //arrange var serverParkMock = new Mock <IServerPark>(); _parkServiceMock.Setup(p => p.GetServerPark(_connectionModel, _serverParkName)).Returns(serverParkMock.Object); //act _sut.GetServerPark(_serverParkName); //assert _parkServiceMock.Verify(v => v.GetServerPark(_connectionModel, _serverParkName), Times.Once); }
public ServerParkDto GetServerPark(string serverParkName) { serverParkName.ThrowExceptionIfNullOrEmpty("serverParkName"); var serverPark = _blaiseApi.GetServerPark(serverParkName); return(_mapper.MapToServerParkDto(serverPark)); }