public void TestBuildUriMinimalConstructor() { String expected = GengoClient.ProductionBaseUri + "bazinga?api_key=bar"; var prodClient = new GengoClient("foo", "bar"); var uri = prodClient.BuildUri("bazinga", false); Assert.AreEqual(expected, uri.ToString()); }
public void TestBuildUriProductionConstructor() { String expected = GengoClient.ProductionBaseUri + "bazinga?api_key=bar"; var prodClient = new GengoClient("foo", "bar", ClientMode.Production); var uri = prodClient.BuildUri("bazinga", false); Assert.AreEqual(expected, uri.ToString()); }
public void TestBuildUriSandboxConstructor() { String expected = GengoClient.SandboxBaseUri + "bazinga?api_key=bar"; var prodClient = new GengoClient("foo", "bar", ClientMode.Sandbox); var uri = prodClient.BuildUri("bazinga", false); Assert.AreEqual(expected, uri.ToString()); }
public void TestBuildUriCustomUriConstructor() { String customUri = "http://www.example.com/"; String expected = customUri + "bazinga?api_key=bar"; var prodClient = new GengoClient("foo", "bar", customUri); var uri = prodClient.BuildUri("bazinga", false); Assert.AreEqual(expected, uri.ToString()); }
public void SetUpAttribute() { _client = new GengoClient(TestKeys.PrivateKey, TestKeys.PublicKey, ClientMode.Sandbox); }
public void TestBuildUriThrowsOnAbsoluteUri() { var client = new GengoClient("foo", "bar"); client.BuildUri("http://absolute.uri/", false); }
public void TestBuildUriThrowsOnNullArgument() { var client = new GengoClient("foo", "bar"); client.BuildUri(null, false); }
public void TestConstructorValidatesCustomUri() { var client = new GengoClient("foo", "bar", "http://www.example.com"); Assert.IsTrue(true); }
public void TestConstructorFailsOnRelativeUri() { var client = new GengoClient("foo", "bar", "baz"); Assert.Fail("Constructor did not throw exception"); }
public void SetUpAttribute() { client = new GengoClient(TestKeys.PrivateKey, TestKeys.PublicKey, ClientMode.Sandbox); }