public void MakePaymentShouldFailWhenTheAccountDoesNotAllowThePaymentSchemaRequested()
        {
            var serviceUnderTest = new PaymentService(accountDataStoreFactory.GetAccountDataStore());

            var response = serviceUnderTest.MakePayment(request);

            Assert.AreEqual(false, response.Success);
        }
Esempio n. 2
0
        public void IsDefaultFactoryReturned()
        {
            var mockAppConfig = A.Fake <IAppConfig>();

            A.CallTo(() => mockAppConfig.GetValueByKey("DataStoreType")).Returns("Live");

            var mockAccountDataStoreFactory = new AccountDataStoreFactory(mockAppConfig);

            Assert.True(mockAccountDataStoreFactory != null);

            var mockAccountDataStore = mockAccountDataStoreFactory.GetAccountDataStore();

            Assert.True(mockAccountDataStore != null);

            Assert.Equal("AccountDataStore", mockAccountDataStore.GetType().Name);
        }
Esempio n. 3
0
        public void WhenDataStoreTypeIsNotBackendThenNormalAccountReturned()
        {
            var accountDataStore = _accountDataStoreFactory.GetAccountDataStore();

            Assert.That(accountDataStore, Is.TypeOf <AccountDataStore>());
        }