private PostSampleService GetMockedPostSampleService() { var mockedDefaultDbContext = MockDefaultHelper .GetMockedDbContext() .AddMockedSamples(); var mockedDefaultDbContextQuery = MockDefaultHelper .GetMockedDbContextQuery() .AddMockedSamples(); var mockedSampleValidator = new SampleValidator(); var mockedSampleNameAlreadyExistsSpecification = new SampleDescriptionAlreadyExistsSpecification( mockedDefaultDbContextQuery.Object); var mockedPostSampleSpecificationsValidator = new PostSampleSpecificationsValidator( mockedSampleNameAlreadyExistsSpecification); var mockedPostSampleService = new PostSampleService( mockedDefaultDbContext.Object, mockedSampleValidator, mockedPostSampleSpecificationsValidator); return(mockedPostSampleService); }
public PostSampleService( IDefaultDbContext context, SampleValidator entityValidator, PostSampleSpecificationsValidator domainValidator ) : base(entityValidator, domainValidator) { Context = context; }