Пример #1
0
 public StoreInformationRequestFromServiceRequestFactoryTests()
 {
     this.stringToObjectFactorySpy = new StringToObjectFactoryReturnsIntegerSpy();
     this.factory = new StoreInformationRequestFromServiceRequestFactory(new[]
     {
         this.stringToObjectFactorySpy
     });
 }
Пример #2
0
        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);
        }