-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
davidvlaminck
committed
Nov 6, 2024
1 parent
15c8877
commit 3d2f0a7
Showing
2 changed files
with
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import pytest | ||
|
||
from otlmow_model.OtlmowModel.Classes.ImplementatieElement.AIMNaamObject import NaamField | ||
|
||
|
||
@pytest.mark.parametrize("value, expected, id", [ | ||
("validName123", True, "valid_alphanumeric"), | ||
("valid.name-123", True, "valid_with_special_chars"), | ||
("", True, "empty_string"), | ||
("a", True, "single_character"), | ||
("invalid name!", False, "invalid_with_space_and_exclamation"), | ||
("invalid@name", False, "invalid_with_at_symbol")]) | ||
def test_validate(value, expected, id): | ||
result = NaamField.validate(value, None) | ||
assert result == expected, f"Test case '{id}' failed: expected {expected} but got {result}" |
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