def test_implements_multi(self): filepath = self.current_directory / "OsSecureRandom.java" ast = AST.build_from_javalang(build_ast(filepath)) pattern = ImplementsMultiFinder() lines = pattern.value(ast) self.assertEqual(lines, [42])
def test_implements_with_parantheses_before(self): filepath = self.current_directory / "FJListProcedureRunner.java" ast = AST.build_from_javalang(build_ast(filepath)) pattern = ImplementsMultiFinder() lines = pattern.value(ast) self.assertEqual(lines, [])
def test_implements_in_comments(self): filepath = self.current_directory / "KeyProviderCryptoExtension.java" ast = AST.build_from_javalang(build_ast(filepath)) pattern = ImplementsMultiFinder() lines = pattern.value(ast) self.assertEqual(lines, [])
def test_implements_multi_classes(self): filepath = self.current_directory / "FillContent.java" ast = AST.build_from_javalang(build_ast(filepath)) pattern = ImplementsMultiFinder() lines = pattern.value(ast) self.assertEqual(lines, [29])
def test_implements_with_parantheses_multi(self): filepath = self.current_directory / "FJIterateTest.java" ast = AST.build_from_javalang(build_ast(filepath)) pattern = ImplementsMultiFinder() lines = pattern.value(ast) self.assertEqual(lines, [601])
def test_implements_with_nested_parantheses(self): filepath = self.current_directory / "Configuration.java" ast = AST.build_from_javalang(build_ast(filepath)) pattern = ImplementsMultiFinder() lines = pattern.value(ast) self.assertEqual(lines, [225])
def test_implements_in_string(self): filepath = self.current_directory / "AuditEventModelProcessor.java" ast = AST.build_from_javalang(build_ast(filepath)) pattern = ImplementsMultiFinder() lines = pattern.value(ast) self.assertEqual(lines, [])
def test_two_classes(self): filepath = self.current_directory / "AnimatableTransform.java" ast = AST.build_from_javalang(build_ast(filepath)) pattern = ImplementsMultiFinder() lines = pattern.value(ast) self.assertEqual(lines, [12])
def test_one_class_with_types(self): filepath = self.current_directory / "AnimatableSplitDimensionPathValue.java" ast = AST.build_from_javalang(build_ast(filepath)) pattern = ImplementsMultiFinder() lines = pattern.value(ast) self.assertEqual(lines, [])
def test_implements_many(self): filepath = self.current_directory / "SequenceFile.java" ast = AST.build_from_javalang(build_ast(filepath)) pattern = ImplementsMultiFinder() lines = pattern.value(ast) self.assertEqual(lines, [837])