public void Format_parsed_data_copied_from_real_CSV_in_expected_format() {//Uses real line from CSV in the expected format after parsing. string[,] parsedCsvData = { { "1", "VSTest: MonolithTests.NancyTests.RootModuleTests.when_unauthorized_get_on_root_url_should_redirect_us_to_login_page", "OK", "510" } }; string[,] expectedFormattedData = { { "RootModuleTests", "When unauthorized get on root url should redirect us to login page" } }; FormattingClass Formatter = new FormattingClass(); string[,] mockFormattedData = Formatter.Format(parsedCsvData); CollectionAssert.AreEqual(expectedFormattedData, mockFormattedData); }
public void Format_parsed_data_with_a_test_from_two_different_groups() {//Uses real line from CSV in the expected format after parsing. string[,] parsedCsvData = { { "1", "VSTest: MonolithTests.NancyTests.RootModuleTests.when_unauthorized_get_on_root_url_should_redirect_us_to_login_page", "OK", "510" }, { "7", "VSTest: MonolithTests.NancyTests.UploadModuleTests.get_on_upload_root_url_gives_us_OK_status", "OK", "86" } }; string[,] expectedFormattedData = { { "RootModuleTests", "When unauthorized get on root url should redirect us to login page" }, { "UploadModuleTests", "Get on upload root url gives us OK status" } }; FormattingClass Formatter = new FormattingClass(); string[,] mockFormattedData = Formatter.Format(parsedCsvData); CollectionAssert.AreEqual(expectedFormattedData, mockFormattedData); }
public void Format_parsed_data_with_two_tests_from_same_group() {//Uses real line from CSV in the expected format after parsing. string[,] parsedCsvData = { { "1", "VSTest: MonolithTests.NancyTests.RootModuleTests.when_unauthorized_get_on_root_url_should_redirect_us_to_login_page", "OK", "510" }, { "2", "VSTest: MonolithTests.NancyTests.RootModuleTests.when_authorized_as_an_analyst_get_on_root_should_provide_rulesupload_view", "OK", "198" } }; string[,] expectedFormattedData = { { "RootModuleTests", "When unauthorized get on root url should redirect us to login page" }, { " ", "When authorized as an analyst get on root should provide rulesupload view" } }; FormattingClass Formatter = new FormattingClass(); string[,] mockFormattedData = Formatter.Format(parsedCsvData); CollectionAssert.AreEqual(expectedFormattedData, mockFormattedData); }