public void MakePaymentShouldFailWhenTheAccountDoesNotAllowThePaymentSchemaRequested() { var serviceUnderTest = new PaymentService(accountDataStoreFactory.GetAccountDataStore()); var response = serviceUnderTest.MakePayment(request); Assert.AreEqual(false, response.Success); }
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); }
public void WhenDataStoreTypeIsNotBackendThenNormalAccountReturned() { var accountDataStore = _accountDataStoreFactory.GetAccountDataStore(); Assert.That(accountDataStore, Is.TypeOf <AccountDataStore>()); }