-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add unit test for additional branches
- Loading branch information
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/test/java/com/endava/cats/util/CatsModeLUtilsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.endava.cats.util; | ||
|
||
import io.quarkus.test.junit.QuarkusTest; | ||
import org.assertj.core.api.Assertions; | ||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.CsvSource; | ||
|
||
@QuarkusTest | ||
class CatsModeLUtilsTest { | ||
|
||
@ParameterizedTest | ||
@CsvSource(value = { | ||
"#/components/schemas/SomeSchema, SomeSchema", | ||
"#/components/schemas/AnotherSchema, AnotherSchema", | ||
"#/components/schemas/YetAnotherSchema, YetAnotherSchema", | ||
"null,null", "#/paths/path1,#/paths/path1"}, nullValues = "null") | ||
void shouldReturnSimpleReference(String ref, String expected) { | ||
String result = CatsModelUtils.getSimpleRef(ref); | ||
|
||
Assertions.assertThat(result).isEqualTo(expected); | ||
} | ||
} |