Ejemplo n.º 1
0
        public void TestLogin()
        {
            var session = new RaidarSession();

            session.Login(username, password);
            Assert.IsTrue(session.IsLoggedIn);
        }
Ejemplo n.º 2
0
        public void TestUploadAndWait()
        {
            var session = new RaidarSession();

            session.Login(username, password);
            Assert.IsTrue(session.IsLoggedIn);

            var testLog      = Path.Combine(testFiles, "20170904-143221.evtc");
            var notification = session.UploadAndWait(testLog);

            Assert.IsNotNull(notification);
            Assert.AreEqual("20170904-143221.evtc", notification.Filename);
        }
Ejemplo n.º 3
0
        public void TestLoginIncorrect()
        {
            var session = new RaidarSession();

            try
            {
                session.Login(username, "incorrect");
                Assert.Fail("Login with incorrect credentials did not fail");
            }
            catch (WebException e)
            {
                if (!e.Message.StartsWith("Unable to log in"))
                {
                    throw;
                }
            }

            Assert.IsFalse(session.IsLoggedIn);
        }