Exemplo n.º 1
0
        public void MustSucceedLogin()
        {
            var client = new EzAuthClient("http://localhost/api");
            var res    = client.Login("admin", "12345678").Result;

            Assert.IsTrue(res);
        }
Exemplo n.º 2
0
        public void MustGetToken()
        {
            var client = new EzAuthClient("http://localhost/api");
            var res    = client.Login("admin", "12345678").Result;

            Assert.IsTrue(Regex.IsMatch(client.Token, @"[a-f0-9]{64}"));
        }
Exemplo n.º 3
0
        public void MustSucceedRequestActivation()
        {
            var client = new EzAuthClient("http://localhost/api");
            var res    = client.Login("admin", "12345678").Result;

            var af = File.ReadAllBytes("/home/ayman/Projects/ezauth-client/EZAuthClient.Tests/key");

            Assert.IsTrue(client.RequestActivation(af).Result);
        }
Exemplo n.º 4
0
 public void MustSucceedDecrptLicense()
 {
     var client     = new EzAuthClient("http://localhost/api");
     var licenseKey =
 }
Exemplo n.º 5
0
        public void MustFailLogin()
        {
            var client = new EzAuthClient("http://localhost/api");

            Assert.IsFalse(client.Login("root", "123").Result);
        }