private Expert FromExpertRepositoryReturnFakeExpert(string expertName, SessionOfExperts session) { var expert = Substitute.For <Expert>(); FakeExpertRepository.GetExpertByNameAndSession( Arg.Is <GetExpertByNameAndSessionSpecification>( x => x.ExpertName == expertName && x.SessionOfExperts == session)) .Returns(expert); return(expert); }
private void FromExpertRepositoryReturnNullExpert() { FakeExpertRepository.GetExpertByNameAndSession( Arg.Any <GetExpertByNameAndSessionSpecification>()) .Returns((Expert)null); }