-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OPIK-121] Allow multiline in dataset description (#339)
* [OPIK-121] Allow multiline in dataset description * Add docs
- Loading branch information
1 parent
e702307
commit dc1556c
Showing
4 changed files
with
89 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
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
30 changes: 30 additions & 0 deletions
30
apps/opik-backend/src/test/java/com/comet/opik/utils/ValidationUtilsTest.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,30 @@ | ||
package com.comet.opik.utils; | ||
|
||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.Arguments; | ||
import org.junit.jupiter.params.provider.MethodSource; | ||
|
||
import java.util.stream.Stream; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
class ValidationUtilsTest { | ||
|
||
public static Stream<Arguments> testNullOrNotBlank() { | ||
return Stream.of( | ||
Arguments.of("", false), | ||
Arguments.of(" ", false), | ||
Arguments.of("\n", false), | ||
Arguments.of("a", true), | ||
Arguments.of(" a ", true), | ||
Arguments.of("\n a \n", true) | ||
); | ||
} | ||
|
||
@ParameterizedTest | ||
@MethodSource | ||
void testNullOrNotBlank(String input, boolean expected) { | ||
assertEquals(expected, input.matches(ValidationUtils.NULL_OR_NOT_BLANK)); | ||
} | ||
|
||
} |