コード例 #1
0
 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])
コード例 #2
0
 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, [])
コード例 #3
0
 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, [])
コード例 #4
0
 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])
コード例 #5
0
 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])
コード例 #6
0
 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])
コード例 #7
0
 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, [])
コード例 #8
0
 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])
コード例 #9
0
 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, [])
コード例 #10
0
 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])