diff --git a/backend/cinemateketTests/Usings.cs b/backend/cinemateketTests/Usings.cs new file mode 100644 index 0000000..8c927eb --- /dev/null +++ b/backend/cinemateketTests/Usings.cs @@ -0,0 +1 @@ +global using Xunit; \ No newline at end of file diff --git a/backend/cinemateketTests/ValidatorTests/QueryParameterValidatorsTests.cs b/backend/cinemateketTests/ValidatorTests/QueryParameterValidatorsTests.cs new file mode 100644 index 0000000..4a11fca --- /dev/null +++ b/backend/cinemateketTests/ValidatorTests/QueryParameterValidatorsTests.cs @@ -0,0 +1,18 @@ +using Xunit; +using backend; + + +public class QueryParameterValidatorsTests +{ + [Theory] + [InlineData("Star Wars", true)] + [InlineData("", false)] + [InlineData(null, false)] + public void IsValidS_ShouldReturnExpectedResult(string input, bool expectedResult) + { + bool result = QueryParameterValidators.IsValidS(input); + Assert.Equal(expectedResult, result); + } + + // Add more tests for other validators +} \ No newline at end of file diff --git a/backend/cinemateketTests/cinemateketTests.csproj b/backend/cinemateketTests/cinemateketTests.csproj new file mode 100644 index 0000000..084a522 --- /dev/null +++ b/backend/cinemateketTests/cinemateketTests.csproj @@ -0,0 +1,35 @@ + + + + net7.0 + enable + enable + + false + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + +