Ejemplo n.º 1
0
        public void TestGetAccountDetail()
        {
            var account = conn.ACCOUNT.First(a => a.POSITION.Count > 1);
            var group   = conn.ACCOUNT_GROUP.First(g => g.Code == account.AccountGroup);
            var ownerId = account.PLATFORM_USER_ACCOUNT.First().PlatformUser;
            var user    = conn.PLATFORM_USER.First(u => u.ID == ownerId);

            const long magic = 1;
            var        hash  = CredentialsHash.MakeCredentialsHash(user.Login, user.Password, magic);

            decimal brokerLeverage, exposure;
            var     accountResulted = platformManager.GetAccountDetail(hash, user.Login, magic, account.ID, true,
                                                                       out brokerLeverage, out exposure);

            Assert.IsNotNull(accountResulted, "GetAccountDetail - счет не должен быть null");
            Assert.AreEqual(group.BrokerLeverage, brokerLeverage, "GetAccountDetail - плечо брокера определено неверно");
            Assert.Greater(exposure, 0, "GetAccountDetail - экспозиция должна быть больше 0");
        }