Exemplo n.º 1
0
        public void WhenClickOnSort()
        {
            var         obj         = new ChiaApplicationController();
            var         actResult   = obj.GetChiaList() as ViewResult;
            ChiaDetails chiaDetails = (ChiaDetails)actResult.Model;

            Assert.That(chiaDetails.issueInfo.Count > 0);
            Assert.That(actResult.View, Is.EqualTo(null));
        }
Exemplo n.º 2
0
        public void InValidPassword()
        {
            var        obj  = new ChiaApplicationController();
            LoginModel uspw = new LoginModel();

            uspw.UserName = "******";
            uspw.Password = "******";
            var actResult = obj.GetChia(uspw) as RedirectResult;

            Assert.That(actResult.Url, Is.EqualTo("~/ChiaApplication/Login"));
            Assert.That(ChiaApplicationController.ErrorMessage == "Logon failure: unknown user name or bad password.\r\n" || ChiaApplicationController.ErrorMessage == "The user name or password is incorrect.\r\n");
        }
Exemplo n.º 3
0
        public void EmptyPassword()
        {
            var        obj  = new ChiaApplicationController();
            LoginModel uspw = new LoginModel();

            uspw.UserName = "******";
            uspw.Password = "******";
            var actResult = obj.GetChia(uspw) as RedirectResult;

            Assert.That(actResult.Url, Is.EqualTo("~/ChiaApplication/Login"));
            Assert.That(ChiaApplicationController.ErrorMessage, Is.EqualTo("UserName or Password cannot be Empty!"));
        }
Exemplo n.º 4
0
        public void GettingRemotelinks()
        {
            ChiaApplicationController.user = "******";
            ChiaApplicationController.pwd  = "Summer2018!";
            string CHIA_No = "CHIA-28551";
            Dictionary <string, string> CRList = new Dictionary <string, string>();
            var obj1 = new ChiaApplicationController();

            obj1.getremotelinks(CHIA_No, ref CRList);
            Assert.That(CRList.Count > 0);
            Assert.That(CRList.ContainsKey("GLB-294"));
            Assert.That(CRList.ContainsValue("https://jira2.cerner.com/browse/GLB-294"));
        }
Exemplo n.º 5
0
        public void ValidUserNamePassword()
        {
            var        obj  = new ChiaApplicationController();
            LoginModel uspw = new LoginModel();

            uspw.UserName = "******";
            uspw.Password = "******";
            var         actResult = obj.GetChia(uspw) as ViewResult;
            ChiaDetails model     = (ChiaDetails)actResult.Model;

            Assert.That(actResult.ViewName, Is.EqualTo("GetChiaList"));
            Assert.That(model.FromDate, Is.EqualTo(null));
            Assert.That(model.ToDate, Is.EqualTo(null));
            Assert.That(model.issueInfo.Count, Is.EqualTo(0));
        }
Exemplo n.º 6
0
        public void GettingCHIAIssues()
        {
            string FromDate = "2018-01-01";
            string ToDate   = "2018-06-06";
            string From     = Convert.ToDateTime(FromDate).ToString("yyyy/MM/dd");
            string To       = Convert.ToDateTime(ToDate).ToString("yyyy/MM/dd");

            ChiaApplicationController.user = "******";
            ChiaApplicationController.pwd  = "Summer2018!";
            ChiaApplicationController.from = FromDate;
            ChiaApplicationController.to   = ToDate;
            var obj       = new ChiaApplicationController();
            var actResult = obj.GettingCHIAIssues() as ChiaDetails;

            Assert.That(actResult.issueInfo.Count > 0);
            Assert.That(ChiaApplicationController.from, Is.EqualTo("2018-01-01"));
            Assert.That(ChiaApplicationController.to, Is.EqualTo("2018-06-06"));
        }