public LessonServiceTest() { _entityValidator = A.Fake<EntityValidator>(); _lessonRepository = A.Fake<ILessonRepository>(); _lessonDtoMapper = A.Fake<ILessonDtoMapper>(); _lessonService = new LessonService( _entityValidator, _lessonRepository, _lessonDtoMapper); }
public LessonService(EntityValidator entityValidator, ILessonRepository lessonRepository, ILessonDtoMapper lessonDtoMapper) { if (entityValidator == null) { throw new ArgumentNullException("entityValidator"); } if (lessonRepository == null) { throw new ArgumentNullException("lessonRepository"); } if (lessonDtoMapper == null) { throw new ArgumentNullException("lessonDtoMapper"); } _entityValidator = entityValidator; _lessonRepository = lessonRepository; _lessonDtoMapper = lessonDtoMapper; }