예제 #1
0
        } // AnyZeroAddresses

        /// <summary>
        /// Validate concept header minimal columns are there
        /// </summary>
        /// <param name="csv"></param>
        /// <returns></returns>
        private bool ValidateConceptHeader(ref ConceptCSV csv)
        {
            bool result = csv.ValidateHeader();

            if (!result)
            {
                // TODO: Fix this to display the missing information
                log.Error("Failed to validate required headers");
                using (new CenterDialog(this))
                {
                    MessageBoxButtons buttons = MessageBoxButtons.OK;
                    MessageBox.Show($"Error in csv.  There are missing required header rows.  See Log file and documentation for more information.", "Error in Rollout CSV Headers", buttons);
                }
            }
            else
            {
                log.Debug("All required columns exist");
            }
            return(result);
        } // ValidateConceptHeader
예제 #2
0
        public void TestGoodExampleSpreadsheet()
        {
            bool       passed      = true;
            ConceptCSV TestConcept = TestGoodRead();

            if (null != TestConcept)
            {
                passed = TestConcept.ValidateHeader();
                if (passed)
                {
                    passed = TestConcept.ValidateRows();
                    int numRows = TestConcept.RowCount;
                    passed = passed && (56 == numRows);
                    Assert.IsTrue(passed);
                }
            }
            else
            {
                Assert.IsTrue(false);
            }
        }