示例#1
0
        public void GivenICreateTheQaUsersForTheDmiApiTestProject()
        {
            DMIUser dmiuser = DMIUser.Create(APITestProjectConfig.QA1ClientId, "qa1").GetAwaiter().GetResult();

            dmiuser.CanViewOrders();
            dmiuser.CanViewSettlements();
            dmiuser.CanViewBalances();
            dmiuser.CanSettleNetPositions();
            dmiuser.CanViewHoldings();
            DMIUser dmiuser2 = DMIUser.Create(APITestProjectConfig.QA2ClientId, "qa2").GetAwaiter().GetResult();

            dmiuser2.CanViewOrders();
            dmiuser2.CanViewSettlements();
            dmiuser2.CanViewBalances();
            dmiuser2.CanSettleNetPositions();
            dmiuser2.CanViewHoldings();
            DMIUser dmiuser3 = DMIUser.Create(APITestProjectConfig.QA3ClientId, "qa3").GetAwaiter().GetResult();

            dmiuser3.CanViewOrders();
            dmiuser3.CanViewSettlements();
            dmiuser3.CanViewBalances();
            dmiuser3.CanSettleNetPositions();
            dmiuser3.CanViewHoldings();
            DMIUser dmiuser4 = DMIUser.Create(APITestProjectConfig.QA4ClientId, "qa4tpa").GetAwaiter().GetResult();

            dmiuser4.CanViewOrders();
            dmiuser4.CanViewSettlements();
            dmiuser4.CanViewBalances();
        }
示例#2
0
        public Access WithUsername(string username)
        {
            DMIUser dmiuser = DMIUser.Create(ComponentLibrary.Config.Environment.ClientId, username).GetAwaiter().GetResult();

            this.dmiuser = dmiuser;
            return(this);
        }
        public async Task <DMIUser> intializeDmiUser()
        {
            //DMIUser user = new DMIUser("dgfdg");
            //NewUser newuser = NewUser.GenerateRandomUser();
            //newuser.username = "******";
            //DMIUser user = await DMIUser.Create(newuser, "someclient");
            DMIUser user = await DMIUser.Create("someclient");

            _objectContainer.RegisterInstanceAs <DMIUser>(user);
            Actor james = new Actor();

            _objectContainer.RegisterInstanceAs <Actor>(james);

            return(user);
        }
示例#4
0
        public static Access TheDmi()
        {
            DMIUser dmiuser = DMIUser.Create(ComponentLibrary.Config.Environment.ClientId).GetAwaiter().GetResult();

            return(new Access(dmiuser));
        }