Exemplo n.º 1
0
        public void GetTokenAsyncNullReferenceExceptionTest()
        {
            var client = new TesonetClient("http://google.com");

            Assert.ThrowsAsync <ArgumentException>(() => client.GetTokenAsync(null, "test"));
            Assert.ThrowsAsync <ArgumentException>(() => client.GetTokenAsync("test", null));
        }
Exemplo n.º 2
0
        public void BadUserNameOrPasswordExceptionTest()
        {
            var connectionString = ConfigurationManager.ConnectionStrings["tesonetApi"].ConnectionString;

            var client = new TesonetClient(connectionString);

            Assert.ThrowsAsync <Exception>(() => client.GetTokenAsync("test", "test"));
        }