예제 #1
0
        public void GiventheStateCensusCSV_FilewhenCorrectbutcsvheaderincorrectReturnsCustomException()
        {
            StateCensusAnalyser matches = new StateCensusAnalyser();
            string filepath             = @"C:\Users\The Daddy\source\repos\IndianStatesCensus\IndianStatesCensus\StateCensusData.csv";

            Assert.AreEqual("File Contains Invalid Headers", matches.StateCensusAnalyzer(filepath));
        }
예제 #2
0
        public void GiventheStateCensusCSVFileincorrectReturnscustomException()
        {
            StateCensusAnalyser matches = new StateCensusAnalyser();
            string filepath             = @"C:\Users\The Daddy\source\repos\IndianStatesCensus\IndianStatesCensus\StateCensusData.txt";

            Assert.AreEqual("There is No Such Files", matches.StateCensusAnalyzer(filepath));
        }
예제 #3
0
        public void GiventheStateCensusCSV_File_type_IncorrectReturn_Exception()
        {
            StateCensusAnalyser matches = new StateCensusAnalyser();
            string filepath             = @"C:\Users\The Daddy\source\repos\IndianStatesCensus\IndianStatesCensus\StateCensusData.csv";

            Assert.AreEqual("File Contains Invalid Records", matches.StateCensusAnalyzer(filepath));
        }
예제 #4
0
        public void GiventheStatesWhenAnalyseShouldRecordNumberOfRecordmatches()
        {
            StateCensusAnalyser matches = new StateCensusAnalyser();
            string filepath             = @"C:\Users\The Daddy\source\repos\IndianStatesCensus\IndianStatesCensus\StateCensusData.csv";

            Assert.AreEqual("30", matches.StateCensusAnalyzer(filepath));
        }