Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }