Beispiel #1
0
        private void CloudServiceConstructorTester(string id, string key)
        {
            try
            {
                IServices services = new HotDocs.Sdk.Server.Cloud.Services(id, key);
                Assert.IsTrue(services is HotDocs.Sdk.Server.Cloud.Services);

                if (string.IsNullOrEmpty(id) || string.IsNullOrEmpty(key))
                {
                    Assert.Fail();                     // We should have had an exception before reaching this.
                }
            }
            catch (ArgumentNullException)
            {
                Assert.IsTrue(string.IsNullOrEmpty(id) || string.IsNullOrEmpty(key));
            }
            catch (Exception)
            {
                Assert.Fail();
            }
        }
        private void CloudServiceConstructorTester(string id, string key)
        {
            try
            {
                IServices services = new HotDocs.Sdk.Server.Cloud.Services(id, key);
                Assert.IsTrue(services is HotDocs.Sdk.Server.Cloud.Services);

                if (string.IsNullOrEmpty(id) || string.IsNullOrEmpty(key))
                    Assert.Fail(); // We should have had an exception before reaching this.
            }
            catch (ArgumentNullException)
            {
                Assert.IsTrue(string.IsNullOrEmpty(id) || string.IsNullOrEmpty(key));
            }
            catch (Exception)
            {
                Assert.Fail();
            }
        }