public StoreInformationRequestFromServiceRequestFactoryTests() { this.stringToObjectFactorySpy = new StringToObjectFactoryReturnsIntegerSpy(); this.factory = new StoreInformationRequestFromServiceRequestFactory(new[] { this.stringToObjectFactorySpy }); }
public void StoreInformation(InformationRequest request) { var storeInformationRequest = new StoreInformationRequestFromServiceRequestFactory( new IStringToObject[] { new NullableBooleanFromStringFactory(), new NullableIntegerFromStringFactory(), new NullableDateTimeFromStringFactory() } ).CreateRequest(request); var mongoClient = new MongoClient(); var repository = new StoreInformationMongoDatabaseRepository(mongoClient.GetDatabase("information-store")); var interactor = new StoreInformationInteractor(repository); interactor.Execute(storeInformationRequest); }