예제 #1
0
 /// <summary>Creates new user.</summary>
 /// <param name="user">UserLegal object to be created.</param>
 /// <returns>UserLegal instance returned from API.</returns>
 public UserLegalDTO Create(UserLegalPostDTO user)
 {
     return this.CreateObject<UserLegalDTO, UserLegalPostDTO>(MethodKey.UsersCreateLegals, user);
 }
예제 #2
0
        public void Test_Users_CreateLegal_PassesIfRequiredPropsProvided()
        {
            try
            {
                UserLegalPostDTO userPost = new UserLegalPostDTO("*****@*****.**", "SomeOtherSampleOrg", LegalPersonType.BUSINESS, "RepFName", "RepLName", new DateTime(1975, 12, 21, 0, 0, 0), CountryIso.FR, CountryIso.FR);

                UserLegalDTO userCreated = this.Api.Users.Create(userPost);

                UserLegalDTO userGet = this.Api.Users.GetLegal(userCreated.Id);

                Assert.IsTrue(userCreated.Id.Length > 0, "Created successfully after required props set.");

                AssertEqualInputProps(userCreated, userGet);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }