Exemplo n.º 1
0
        public virtual void requirementsNoConfigForPair()
        {
            FxRateMarketDataFunction function = new FxRateMarketDataFunction();
            CurrencyPair             gbpUsd   = CurrencyPair.of(Currency.GBP, Currency.USD);

            assertThat(function.requirements(FxRateId.of(gbpUsd), config())).isEqualTo(MarketDataRequirements.empty());
        }
Exemplo n.º 2
0
        public virtual void requirementsInverse()
        {
            FxRateMarketDataFunction function     = new FxRateMarketDataFunction();
            MarketDataRequirements   requirements = function.requirements(FxRateId.of(CURRENCY_PAIR.inverse()), config());

            assertThat(requirements).isEqualTo(MarketDataRequirements.of(QUOTE_ID));
        }
Exemplo n.º 3
0
        public virtual void requirementsMissingConfig()
        {
            FxRateMarketDataFunction function = new FxRateMarketDataFunction();
            string regex = "No configuration found .*FxRateConfig";

            assertThrowsIllegalArg(() => function.requirements(RATE_ID, MarketDataConfig.empty()), regex);
        }
Exemplo n.º 4
0
        public virtual void requirements()
        {
            FxRateMarketDataFunction function     = new FxRateMarketDataFunction();
            MarketDataRequirements   requirements = function.requirements(RATE_ID, config());

            assertThat(requirements).isEqualTo(MarketDataRequirements.of(QUOTE_ID));
        }