Пример #1
0
        public void TestLogin()
        {
            var session = new RaidarSession();

            session.Login(username, password);
            Assert.IsTrue(session.IsLoggedIn);
        }
Пример #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);
        }
Пример #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);
        }