public void UnitTests_Phaxio_InvalidSecretThrowsException() { var clientBuilder = new IRestClientBuilder { Op = "accountStatus" }; var phaxio = new PhaxioClient(IRestClientBuilder.TEST_KEY, "bad_secret", clientBuilder.Build()); Assert.Throws(typeof(ApplicationException), () => phaxio.GetAccountStatus()); }
public void UnitTests_Phaxio_InvalidKeyThrowsException() { var clientBuilder = new IRestClientBuilder { Op = "accountStatus" }; var phaxio = new PhaxioClient("bad_key", IRestClientBuilder.TEST_SECRET, clientBuilder.Build()); Assert.Throws( typeof(ApplicationException), () => phaxio.GetAccountStatus()); }
public void IntegrationTests_AccountStatus_Get() { var config = new KeyManager(); var phaxio = new PhaxioClient(config["api_key"], config["api_secret"]); var account = phaxio.GetAccountStatus(); }
public void UnitTests_Phaxio_InvalidSecretThrowsException() { var clientBuilder = new IRestClientBuilder { Op = "accountStatus" }; var phaxio = new PhaxioClient(IRestClientBuilder.TEST_KEY, "bad_secret", clientBuilder.Build()); Assert.Throws(typeof(ApplicationException), () => phaxio.GetAccountStatus()); }
public void UnitTests_Phaxio_InvalidKeyThrowsException() { var clientBuilder = new IRestClientBuilder { Op = "accountStatus" }; var phaxio = new PhaxioClient("bad_key", IRestClientBuilder.TEST_SECRET, clientBuilder.Build()); Assert.Throws(typeof(ApplicationException), () => phaxio.GetAccountStatus()); }
public void UnitTests_Phaxio_ValidKeys() { var clientBuilder = new IRestClientBuilder { Op = "accountStatus" }; var phaxio = new PhaxioClient(IRestClientBuilder.TEST_KEY, IRestClientBuilder.TEST_SECRET, clientBuilder.Build()); var account = phaxio.GetAccountStatus(); var expectedAccount = PocoFixtures.GetTestAccount(); }
public void UnitTests_Phaxio_ValidKeys() { var clientBuilder = new IRestClientBuilder { Op = "accountStatus" }; var phaxio = new PhaxioClient(IRestClientBuilder.TEST_KEY, IRestClientBuilder.TEST_SECRET, clientBuilder.Build()); var account = phaxio.GetAccountStatus(); var expectedAccount = PocoFixtures.GetTestAccount(); }
public void UnitTests_AccountStatus () { var clientBuilder = new IRestClientBuilder { Op = "accountStatus" }; var phaxio = new PhaxioClient(IRestClientBuilder.TEST_KEY, IRestClientBuilder.TEST_SECRET, clientBuilder.Build()); var account = phaxio.GetAccountStatus(); var expectedAccount = PocoFixtures.GetTestAccount(); Assert.AreEqual(expectedAccount.FaxesSentThisMonth, account.FaxesSentThisMonth, "FaxesSentThisMonth should be the same."); Assert.AreEqual(expectedAccount.FaxesSentToday, account.FaxesSentToday, "FaxesSentThisWeek should be the same."); Assert.AreEqual(expectedAccount.Balance, account.Balance, "Balance should be the same."); }
public void UnitTests_AccountStatus() { var clientBuilder = new IRestClientBuilder { Op = "accountStatus" }; var phaxio = new PhaxioClient(IRestClientBuilder.TEST_KEY, IRestClientBuilder.TEST_SECRET, clientBuilder.Build()); var account = phaxio.GetAccountStatus(); var expectedAccount = PocoFixtures.GetTestAccount(); Assert.AreEqual(expectedAccount.FaxesSentThisMonth, account.FaxesSentThisMonth, "FaxesSentThisMonth should be the same."); Assert.AreEqual(expectedAccount.FaxesSentToday, account.FaxesSentToday, "FaxesSentThisWeek should be the same."); Assert.AreEqual(expectedAccount.Balance, account.Balance, "Balance should be the same."); }