Update to latest packages and show examples
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using AwesomeAssertions;
|
||||
using GerstITS.Examples.Logic.Shared.Validation;
|
||||
using GerstITS.TestFramework;
|
||||
using Xunit;
|
||||
|
||||
namespace GerstITS.Examples.Tests.Shared.Validation;
|
||||
|
||||
[TestCategory(TestCategories.Unit)]
|
||||
public sealed class IdValidationRuleTest
|
||||
{
|
||||
#region Tests
|
||||
|
||||
[Fact]
|
||||
public void If_the_id_is_positive___It_is_valid()
|
||||
{
|
||||
var result = new IdValidationRule().Validate((object)1);
|
||||
|
||||
result.IsValid.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void If_the_id_is_zero___It_is_invalid()
|
||||
{
|
||||
var result = new IdValidationRule().Validate((object)0);
|
||||
|
||||
result.IsValid.Should().BeFalse();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user