public void Setup() { _repository = MockRepository.GenerateMock<IStudentRepository>(); _studentValidator = MockRepository.GenerateMock<IStudentValidator>(); _studentValidator.Stub(d => d.Validate(Arg<Student>.Is.NotNull)) .Return(true); _studentService = new StudentRegistrationSerivce(_repository, _studentValidator); }