diff --git a/test/test_standardize.py b/test/test_standardize.py new file mode 100644 index 0000000..93478f3 --- /dev/null +++ b/test/test_standardize.py @@ -0,0 +1,35 @@ + +from standardize_test_format import standardize_java_text + + +INPUT_1 = """ +@Test +@DisplayName("Invocations fail with callers without required permissions") +public void selectInvocationWithoutPermission() { } +""" + +OUTPUT_1 = """ +@Test +@DisplayName("Invocations fail with callers without required permissions") +public void selectInvocationWithoutPermission() { } +""" + +INPUT_2 = """ +/** Invocations fail with callers without required permissions. */ +@Test +public void selectInvocationWithoutPermission() { } +""" + +OUTPUT_2 = """ +@Test +@DisplayName("Invocations fail with callers without required permissions") +public void selectInvocationWithoutPermission() { } +""" + +def test_1(): + assert standardize_java_text(INPUT_1) == OUTPUT_1 + +def test_2(): + assert standardize_java_text(INPUT_2) == OUTPUT_2 + +