public NotificationsService(Routes routes, IRepository repository) { Check.IsNotNull(routes, "routes"); Check.IsNotNull(repository, "repository"); this.routes = routes; this.repository = repository; Log.InfoFormat("Service initialized. Repository: [{0}].", repository.GetType()); }
public void IfRepositoryIsNullThrowsException() { Routes routes = new Routes(UriConfiguration); new NotificationsService(routes, null); }
private NotificationsService CreateService(IRepository repository) { Routes routes = new Routes(UriConfiguration); return new NotificationsService(routes, repository); }