Beispiel #1
0
        public void TestGetAllProducts()
        {
            Mock <IDatastore> mockDatastore = new Mock <IDatastore>();

            mockDatastore.Setup(_productExpectation).Returns(_jsonData);

            WhmcsApi         instance = new WhmcsApi("User", "Pass", "Website", mockDatastore.Object);
            ProductsResponse test     = instance.GetProducts();

            Assert.NotNull(test);
        }
Beispiel #2
0
        public void TestGetProducts()
        {
            var results = whmcsApi.GetProducts();

            Assert.AreEqual(98, results.Products.Product.FirstOrDefault().ProductId);
        }
Beispiel #3
0
 public void TestWrongConnectionValues()
 {
     whmcsApi = new WhmcsApi("Username", "Password", "Domain.tld", true, new DataStore());
     whmcsApi.GetProducts();
 }