コード例 #1
0
        public virtual void test_of_CurrencyCurrency_same()
        {
            CurrencyPair test = CurrencyPair.of(USD, USD);

            assertEquals(test.Base, USD);
            assertEquals(test.Counter, USD);
            assertEquals(test.Identity, true);
            assertEquals(test.ToString(), "USD/USD");
        }
コード例 #2
0
        public virtual void test_of_CurrencyCurrency_reverseStandardOrder()
        {
            CurrencyPair test = CurrencyPair.of(USD, GBP);

            assertEquals(test.Base, USD);
            assertEquals(test.Counter, GBP);
            assertEquals(test.Identity, false);
            assertEquals(test.toSet(), ImmutableSet.of(GBP, USD));
            assertEquals(test.ToString(), "USD/GBP");
        }
コード例 #3
0
        //-------------------------------------------------------------------------
        public virtual void test_of_CurrencyCurrency()
        {
            CurrencyPair test = CurrencyPair.of(GBP, USD);

            assertEquals(test.Base, GBP);
            assertEquals(test.Counter, USD);
            assertEquals(test.Identity, false);
            assertEquals(test.toSet(), ImmutableSet.of(GBP, USD));
            assertEquals(test.ToString(), "GBP/USD");
        }