コード例 #1
0
        public void Enhancement_Returns_True()
        {
            bool   expected = true;
            string path     = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName + @"\Documents\testEnhancement.docx";
            bool   result   = _ens.Read(path);

            Assert.AreEqual(expected, result);
        }
        public void FindMatch_Returns_True()
        {
            string enhancement = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName + @"\Documents\testEnhancement.docx";
            string assignee    = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName + @"\Documents\testAssignee.docx";

            bool expected = true;

            _enhancement.Read(enhancement);
            _assignee.Read(assignee);
            FindMatch _fm    = new FindMatch(_assignee, _enhancement);
            bool      result = _fm.Get();

            Assert.AreEqual(expected, result);
        }
コード例 #3
0
        /// <summary>
        /// Process in thread
        /// </summary>
        public void ThreadProc()
        {
            Validation = string.Empty;

            _asn        = new AssigneeModel();
            AsnResponse = _asn.Read(AssigneePath);

            _enh        = new EnhancementModel();
            EnhResponse = _enh.Read(EnhancementPath);

            if (EnhResponse == true && AsnResponse == true)
            {
                _find = new FindMatch(_asn, _enh);
                _find.Get();
                LoaderVisiblity = "Hidden";
                ButtonEnable    = "True";
            }
            else if (AsnResponse == false)
            {
                Validation      = "Invalid Assignee Document Format";
                LoaderVisiblity = "Hidden";
                ButtonEnable    = "True";
            }
            else if (EnhResponse == false)
            {
                Validation      = "Invalid Enhancement Document Format";
                LoaderVisiblity = "Hidden";
                ButtonEnable    = "True";
            }
        }