Exemplo n.º 1
0
        public void Create_Account_withou_Email_Password_throws_Exception()
        {
            using (var httpClient = FakeClientWithJsonResponse("TestData\\CreateAccount.json"))
            {
                var apiClient = new HelloSignClient(httpClient);

                Assert.Throws<ArgumentNullException>(() => {
                    var t = apiClient.CreateAccount("", null);
                });
            }
        }
Exemplo n.º 2
0
        public void Create_Account_Response_Test()
        {
            using (var httpClient = FakeClientWithJsonResponse("TestData\\CreateAccount.json"))
            {
                var apiClient = new HelloSignClient(httpClient);
                var t = apiClient.CreateAccount("*****@*****.**", "somepassowrd");
                var expected = new HSAccount
                {
                    AccountId = "a2b31224f7e6fb5581d2f8cbd91cf65fa2f86aae",
                    EmailAddress = "*****@*****.**",
                    IsPaidHS = false,
                    IsPaidHF = false,
                    Quotas = new HSQuotas
                    {
                        DocumentsLeft = 3,
                        ApiSignatureRequest = 0,
                        TemplatesLeft = 1
                    }
                };

                Assert.Equal(expected, t.Result.Account);
            }
        }