Exemple #1
0
        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());
        }
Exemple #3
0
        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());
        }
Exemple #4
0
        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());
        }
Exemple #5
0
 public void SetUpAttribute()
 {
     _client = new GengoClient(TestKeys.PrivateKey, TestKeys.PublicKey, ClientMode.Sandbox);
 }
        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 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);
 }
Exemple #12
0
        public void TestBuildUriThrowsOnAbsoluteUri()
        {
            var client = new GengoClient("foo", "bar");

            client.BuildUri("http://absolute.uri/", false);
        }
Exemple #13
0
        public void TestBuildUriThrowsOnNullArgument()
        {
            var client = new GengoClient("foo", "bar");

            client.BuildUri(null, false);
        }
Exemple #14
0
        public void TestConstructorValidatesCustomUri()
        {
            var client = new GengoClient("foo", "bar", "http://www.example.com");

            Assert.IsTrue(true);
        }
Exemple #15
0
        public void TestConstructorFailsOnRelativeUri()
        {
            var client = new GengoClient("foo", "bar", "baz");

            Assert.Fail("Constructor did not throw exception");
        }