示例#1
0
        public void Given_Invalid_Argument_When_ParseReportToCSV_Invoked_Then_Empty_String__Array_Asserted()
        {
            StaticCodeAnalysisPMDReportParser obj = new StaticCodeAnalysisPMDReportParser();

            string[] input = new string[] { };
            string[] expectedStringOutput = new string[] { };
            string[] actualStringOutput   = obj.ParseReportToCSV(input);
            CollectionAssert.AreEqual(expectedStringOutput, actualStringOutput);
        }
示例#2
0
        public void Given_Valid_Argument_When_ParseReportToCSV_Invoked_Then_Valid_Result_Asserted()
        {
            StaticCodeAnalysisPMDReportParser obj = new StaticCodeAnalysisPMDReportParser();

            string[] input = { @"C:\Users\320052125\casestudy2\Analyser\feereport\src\AccountantDao.java:26: Ensure that resources like this ResultSet object are closed after use", @"C:\Users\320052125\casestudy2\Analyser\feereport\src\AccountantDao.java:26: Always check the return of one of the navigation method (next,previous,first,last) of a ResultSet." };

            string[] expectedStringOutput = { @"C:\Users\320052125\casestudy2\Analyser\feereport\src\AccountantDao.java,26, Ensure that resources like this ResultSet object are closed after use", @"C:\Users\320052125\casestudy2\Analyser\feereport\src\AccountantDao.java,26, Always check the return of one of the navigation method (next;previous;first;last) of a ResultSet." };

            string[] actualStringOutput = obj.ParseReportToCSV(input);

            CollectionAssert.AreEqual(expectedStringOutput, actualStringOutput);
        }