Exemplo n.º 1
0
        //-------------------------------------------------------------------------
        public virtual void test_builder_list()
        {
            Swap test = Swap.builder().legs(ImmutableList.of(MOCK_GBP1, MOCK_USD1)).build();

            assertEquals(test.Legs, ImmutableList.of(MOCK_GBP1, MOCK_USD1));
            assertEquals(test.CrossCurrency, true);
            assertEquals(test.allPaymentCurrencies(), ImmutableSet.of(GBP, USD));
            assertEquals(test.allCurrencies(), ImmutableSet.of(GBP, EUR, USD));
        }
Exemplo n.º 2
0
        //-------------------------------------------------------------------------
        public virtual void test_allCurrencies()
        {
            Swap test = Swap.of(MOCK_GBP1, MOCK_USD1);

            assertEquals(test.allCurrencies(), ImmutableSet.of(GBP, USD, EUR));
        }