Пример #1
0
        public void Init()
        {
            serviceClient = new UserServiceClient();

            // create test users that can be used with the create and update methods
            User_in.Alias                       = alias;
            User_in.Password                    = "******";
            User_in.Name                        = "Klaus Klaussen";
            User_in.EMail                       = "*****@*****.**";
            User_in.DeleteConfirmation          = false;
            User_in.DeleteConfirmationSpecified = true;

            User_update.DeleteConfirmation          = true;
            User_update.DeleteConfirmationSpecified = true;

            TAddress bill = new TAddress();

            bill.FirstName          = "Klaus";
            bill.LastName           = "Klaussen";
            bill.Street             = "Musterstraße 2";
            bill.EMail              = "*****@*****.**";
            bill.Birthday           = new DateTime(1976, 9, 25, 11, 33, 0);
            User_in.BillingAddress  = bill;
            User_in.ShippingAddress = bill;

            TAttribute attr = new TAttribute();

            attr.Name          = "ChallengePhrase";
            attr.Value         = "my challenge phrase";
            User_in.Attributes = new TAttribute[] { attr };

            User_update.Path     = path + alias;
            User_update.Password = "******";
            User_update.Name     = "Hans Hanssen";
            User_update.EMail    = "*****@*****.**";

            // IMPORTANT!!!
            // .NET has the terrible behavior, to set all boolean and numeric value that are not
            // defined to "false" resp. "0"
            // So if you update an object and do not set the "IsVisible" flag, it will set the object to
            // invisible!!!
            User_update.DeleteConfirmation = true;

            TAddress bill_update = new TAddress();

            bill_update.FirstName      = "Hans";
            bill_update.LastName       = "Hanssen";
            bill_update.Street         = "Musterstraße 2b";
            bill_update.Birthday       = new DateTime(1976, 9, 25, 11, 33, 0);
            User_update.BillingAddress = bill_update;

            TAttribute attr_update = new TAttribute();

            attr_update.Name       = "ChallengePhrase";
            attr_update.Value      = "my updated challenge phrase";
            User_update.Attributes = new TAttribute[] { attr_update };
        }
Пример #2
0
		public void Init()
		{
			serviceClient = new UserServiceClient();
			
			// create test users that can be used with the create and update methods
			User_in.Alias = alias;
			User_in.Password = "******";
			User_in.Name = "Klaus Klaussen";
			User_in.EMail = "*****@*****.**";
            User_in.DeleteConfirmation = false;
            User_in.DeleteConfirmationSpecified = true;

			User_update.DeleteConfirmation = true;
            User_update.DeleteConfirmationSpecified = true;

			TAddress bill = new TAddress();
			bill.FirstName = "Klaus";
			bill.LastName = "Klaussen";
			bill.Street = "Musterstraße 2";
			bill.EMail = "*****@*****.**";
			bill.Birthday = new DateTime(1976,9,25,11,33,0);
			User_in.BillingAddress = bill;
			User_in.ShippingAddress = bill;

			TAttribute attr = new TAttribute();
			attr.Name = "ChallengePhrase";
			attr.Value = "my challenge phrase";
			User_in.Attributes = new TAttribute[]{attr};

			User_update.Path = path + alias;
			User_update.Password = "******";
			User_update.Name = "Hans Hanssen";
			User_update.EMail = "*****@*****.**";

			// IMPORTANT!!!
			// .NET has the terrible behavior, to set all boolean and numeric value that are not
			// defined to "false" resp. "0"
			// So if you update an object and do not set the "IsVisible" flag, it will set the object to
			// invisible!!!
			User_update.DeleteConfirmation = true;

			TAddress bill_update = new TAddress();
			bill_update.FirstName = "Hans";
			bill_update.LastName = "Hanssen";
			bill_update.Street = "Musterstraße 2b";
			bill_update.Birthday = new DateTime(1976,9,25,11,33,0);
			User_update.BillingAddress = bill_update;

			TAttribute attr_update = new TAttribute();
			attr_update.Name = "ChallengePhrase";
			attr_update.Value = "my updated challenge phrase";
			User_update.Attributes = new TAttribute[]{attr_update};
		}