Example #1
0
        public void ModifyCcy_AssetTest()
        {
            Account  acc    = Init.CreateAccountAsset1();
            double   amount = acc.Amount;
            FXMarket fxMkt  = Init.CreateFXMarket();

            acc.ConvertedCcy = fxMkt.CcyRef;
            AssetMarket aMkt = Init.CreateAssetMarket(fxMkt);

            acc.ModifyTotalCcy(fxMkt, aMkt, fxMkt.CcyRef);
            acc.ModifyCcy(fxMkt, aMkt, "NOT USED", Init.Asset3(), false); //last input not used for Accounts
            bool testAmount = acc.ConvertedAmount == amount *aMkt.GetQuote(new AssetCcyPair(Init.Asset3(), fxMkt.CcyRef));

            Assert.IsTrue(
                acc.Ccy.Asset == Init.Asset3() &&
                acc.Amount == amount &&
                testAmount
                );
        }