示例#1
0
文件: JSONTest.cs 项目: radtek/Pos
        public void LoyaltyMateServiceRepeatedRetrieveTest()
        {
            bool status = false;
            Salesforce_credential_provider provider = new Salesforce_credential_provider();
            Credentials crd  = provider.Get_syndicate_credentials("Underground124", "7717");
            string      uuid = "17ef6150-f12c-412a-b503-b12dbf0a368f";
            Member      m    = createMemberObject();

            m.account.email = "*****@*****.**";
            m.uuid          = uuid;
            for (int i = 0; i <= 3; i++)
            {
                //Thread.Sleep(100);
                try
                {
                    Loyalty_mate_service service = new Loyalty_mate_service(crd);
                    m.profile.name = "acn_" + i;
                    service.Update_member_details(m);
                    m      = service.Get_member_details(uuid);
                    status = true;
                }
                catch
                {
                    status = false;
                    throw;
                }
            }

            Assert.AreNotEqual(false, status);
        }
 public void Teardown()
 {
     credentialProvider = null;
     sfClient           = null;
     credentials        = null;
     result             = null;
 }
示例#3
0
文件: JSONTest.cs 项目: radtek/Pos
        public void LoyaltyMateServiceCreationTest()
        {
            bool status = false;
            Salesforce_credential_provider provider = new Salesforce_credential_provider();
            Credentials crd = provider.Get_syndicate_credentials("Underground124", "7717");

            for (int i = 0; i <= 100; i++)
            {
                //Thread.Sleep(100);
                try
                {
                    Trace.WriteLine(string.Format("Creating instance: {0}", i));
                    Loyalty_mate_service service = new Loyalty_mate_service(crd);
                    status = true;
                }
                catch
                {
                    status = false;
                    throw;
                }
            }

            Assert.AreNotEqual(false, status);
        }
 public void Setup()
 {
     credentialProvider = Salesforce_credential_provider.Instance;
     sfClient           = new SforceService();
 }