created the first working test in the project

Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
haraldnilsen 2023-10-12 12:03:34 +02:00
parent ae7c838779
commit c599661f3f
3 changed files with 54 additions and 0 deletions

View file

@ -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
}