def test_dotnet_version_not_present(self): """.NET framework version not in csproj file""" Scanner.csproj_file_scan( [' <NoFrameworkVersion></NoFrameworkVersion>'], "testfile.csproj") results = Scanner.scan_results self.assertEqual(0, len(results))
def dotnet_version_tester(self, sample_data, refactor_rating): Scanner.csproj_file_scan([sample_data], "testfile.csproj") results = Scanner.scan_results self.assertEqual(1, len(results)) self.assertEqual(refactor_rating, results[0].refactor_rating)
def test_dotnet_version_not_present(self): """.NET framework version not in csproj file""" Scanner.csproj_file_scan([' <NoFrameworkVersion></NoFrameworkVersion>'], "testfile.csproj") results = Scanner.scan_results self.assertEqual(0, len(results))
def dotnet_version_tester(self, sample_data, refactor_rating): Scanner.csproj_file_scan([sample_data], "testfile.csproj") results = Scanner.scan_results self.assertEqual(1, len(results)) self.assertEqual(refactor_rating, results[0].scan_item.refactor_rating)