Exemplo n.º 1
0
 public void SecretIsPasswordTest()
 {
     Assert.Throws <Exception>(() => {
         ZulipAuthentication Auth =
             new ZulipAuthentication(UserEmail, UserSecret, true);
     });
 }
Exemplo n.º 2
0
        public static void GetZulipClient()
        {
            ZulipServer         ZuSrv  = new ZulipServer(ServerURL);
            ZulipAuthentication ZuAuth = new ZulipAuthentication(UserEmail, UserSecret);

            client = new ZulipClient(ZuSrv, ZuAuth);
        }
Exemplo n.º 3
0
        public void GenralTests()
        {
            ZulipAuthentication Auth = new ZulipAuthentication(UserEmail, UserSecret);

            Assert.Equal(Auth.UserEmail, UserEmail);
            Assert.Null(Auth.Password);
            Assert.Equal(Auth.UserSecret, UserSecret);
        }
Exemplo n.º 4
0
 public static void GetZulipClient()
 {
     if (!Connected && !string.IsNullOrEmpty(ApiKey))
     {
         ZulipServer         ZuSrv  = new ZulipServer(ServerURL);
         ZulipAuthentication ZuAuth = new ZulipAuthentication(UserEmail, ApiKey);
         client    = new ZulipClient(ZuSrv, ZuAuth);
         Connected = client != null;
     }
 }
Exemplo n.º 5
0
 public void SetUp()
 {
     Auth   = new ZulipAuthentication("email", "api_token");
     Server = new ZulipServer("https://localhost:9991");
 }