Beispiel #1
0
        public void Expenditures_are_shown_in_the_statements_when_server_is_DOWN()
        {
            var insertExpenditureAction = new InsertExpenditureAction();

            _tc.Run(new SetupUnavailableServer(), insertExpenditureAction);

            AssertTopStatementElement(insertExpenditureAction);
        }
 public void Setup()
 {
     _tc = new TestingContext();
     _tc.Run(new SetupLocalSettings(Currency.Pln.Code, Currency.Pln.Code));
     new InsertExpenditureAction().Setup(_tc);
     _settingsViewModel = _tc.Kernel.Get <SettingsViewModel>();
 }
Beispiel #3
0
        public void Adding_expenditures_updates_summaries_using_currency_conversion()
        {
            /*
             * Spending 10 GBP (current currency) shown as 42.73 PLN (main currency)
             */

            var gbpToPlnCode = 4.732m;
            var sum          = 10.0m;

            _tc.Run(
                new SetupLocalSettings(mainCurrency: Currency.Pln.Code, currentCurrency: Currency.Gbp.Code),
                new SetupExchangeRate(Currency.Gbp.Code, Currency.Pln.Code, gbpToPlnCode));

            new InsertExpenditureAction(_fixture.Create <Category>(), sum).Setup(_tc);

            AssertThisWeekSumLabel(gbpToPlnCode * sum);
        }
Beispiel #4
0
 public void Setup()
 {
     _tc = new TestingContext();
     _tc.Run(new SetupLocalSettings(Currency.Pln.Code, Currency.Pln.Code));
     _fixture = new Fixture();
 }
Beispiel #5
0
 public void Setup()
 {
     _tc = new TestingContext();
     _setupLocalSettings = new SetupLocalSettings();
     _tc.Run(_setupLocalSettings);
 }