コード例 #1
0
        public void FilterDisabled()
        {
            const string filterId = "1";
            var filter = new JiraFilter(filterId, false);
            var validator = new JiraFilterValidation(Url, Username, Password, filter);

            Repository.ReplayAll();
            var result = validator.Validate();
            Repository.VerifyAll();

            Assert.IsTrue(result, "Incorrect filter processing");
        }
コード例 #2
0
        public void FilterDoesNotExist()
        {
            const string filterId = "1";
            var filter = new JiraFilter(filterId, true);
            var validator = new JiraFilterValidation(Url, Username, Password, filter);

            Expect.Call(ServiceFactory.CreateNew(Url)).Return(SoapService);
            Expect.Call(SoapService.Login(Username, Password)).Return(Token);
            Expect.Call(SoapService.GetIssuesFromFilter(Token, filterId)).Throw(new Exception());
            SoapService.Dispose();

            Repository.ReplayAll();
            var result = validator.Validate();
            Repository.VerifyAll();

            Assert.IsFalse(result, "Incorrect filter processing");
        }