public void Get_QC_Rule_By_Not_Available_Rule_Name_Test()
        {
            IQualityCheckRepository repository = new QualityCheckRepository(testDBContext);

            var qcRule = repository.GetQualityCheckByName("Not There");

            Assert.IsNull(qcRule);
        }
        public void Get_QC_Rule_By_Rule_Name_Test()
        {
            IQualityCheckRepository repository = new QualityCheckRepository(testDBContext);

            var qcRule = repository.GetQualityCheckByName("Test Rule");

            Assert.IsNotNull(qcRule);

            Assert.AreEqual(qcRule.CreatedBy, 1);
            Assert.AreEqual(qcRule.Description, "Test rule");
            Assert.AreEqual(qcRule.EnforceOrder, true);
            Assert.AreEqual(qcRule.IsActive, true);
            Assert.AreEqual(qcRule.IsVisibleToAll, true);
            Assert.AreEqual(qcRule.ModifiedBy, 1);
            Assert.AreEqual(qcRule.Name, "Test Rule");
            Assert.AreEqual(qcRule.QualityCheckId, 1);
            Assert.AreEqual(qcRule.Name, "Test Rule");
            Assert.IsNull(qcRule.FileQualityChecks);

            Assert.IsNotNull(qcRule.QualityCheckColumnRules);
            Assert.AreEqual(qcRule.QualityCheckColumnRules.Count, 2);

            var selColRule = qcRule.QualityCheckColumnRules.Where(rul => rul.QualityCheckColumnRuleId == 1).FirstOrDefault();

            Assert.AreEqual(selColRule.Description, "Column 1");
            Assert.AreEqual(selColRule.ErrorMessage, "Col1 is required");
            Assert.AreEqual(selColRule.HeaderName, "Col1");
            Assert.AreEqual(selColRule.IsActive, true);
            Assert.AreEqual(selColRule.IsRequired, true);
            Assert.AreEqual(selColRule.Order, 1);
            Assert.AreEqual(selColRule.QualityCheckColumnRuleId, 1);
            Assert.AreEqual(selColRule.QualityCheckId, 1);
            Assert.AreEqual(selColRule.Range, "");

        }
        public void Throw_Exception_On_Get_Null_QCRule_By_Name_Test()
        {
            IQualityCheckRepository repository = new QualityCheckRepository(testDBContext);

            repository.GetQualityCheckByName(null);
        }