refactor: use fixture file for Java test instead of embedded code

This commit is contained in:
Paul Gauthier (aider) 2024-11-27 07:10:38 -08:00
parent ec2b635a1a
commit 447b7af573

View file

@ -350,23 +350,7 @@ class TestRepoMapAllLanguages(unittest.TestCase):
), ),
"java": ( "java": (
"Test.java", "Test.java",
"""public interface Greeting { "", # Now reads from fixture file
String greet(String name);
}
public class Test implements Greeting {
private String prefix = "Hello";
public String greet(String name) {
return prefix + ", " + name + "!";
}
public static void main(String[] args) {
Test greeter = new Test();
System.out.println(greeter.greet("World"));
}
}
""",
"Greeting", # Key symbol to check "Greeting", # Key symbol to check
), ),
"javascript": ( "javascript": (