Adhere to NUnit guidelines

This commit is contained in:
2023-04-26 22:17:07 +02:00
parent 6acdbee154
commit 0365669ea2
2 changed files with 42 additions and 30 deletions

@ -15,12 +15,14 @@ namespace Tests {
[Test]
public void Test_CheckInteger_Simple() {
Assert.IsFalse(Validator.CheckInteger(CreateTextBox(""), true).IsValid);
Assert.IsTrue(Validator.CheckInteger(CreateTextBox(""), false).IsValid);
Assert.IsTrue(Validator.CheckInteger(CreateTextBox("123"), true).IsValid);
Assert.IsTrue(Validator.CheckInteger(CreateTextBox("456"), false).IsValid);
Assert.IsTrue(Validator.CheckInteger(CreateTextBox("1234"), false, 4).IsValid);
Assert.IsTrue(Validator.CheckInteger(CreateTextBox("4567"), false, 3).IsValid);
Assert.Multiple(() => {
Assert.That(Validator.CheckInteger(CreateTextBox(""), true).IsValid, Is.False);
Assert.That(Validator.CheckInteger(CreateTextBox(""), false).IsValid, Is.True);
Assert.That(Validator.CheckInteger(CreateTextBox("123"), true).IsValid, Is.True);
Assert.That(Validator.CheckInteger(CreateTextBox("456"), false).IsValid, Is.True);
Assert.That(Validator.CheckInteger(CreateTextBox("1234"), false, 4).IsValid, Is.True);
Assert.That(Validator.CheckInteger(CreateTextBox("4567"), false, 3).IsValid, Is.True);
});
}
}
}