public void TwoPagedsWithDifferentCountShouldNotBeEqual() { var r1 = Paged <int> .TryCreate(0, new List <int> { 1 }.ToImmutableList()); var r2 = Paged <int> .TryCreate(1, new List <int> { 1 }.ToImmutableList()); Helper.ShouldNotBeEqual(r1, r2); }
public void TwoPagedsWithSameValueShouldBeEqual() { var r1 = Paged <int> .TryCreate(0, new List <int> { 1 }.ToImmutableList()); var r2 = Paged <int> .TryCreate(0, new List <int> { 1 }.ToImmutableList()); Helper.ShouldBeEqual(r1, r2); }
public void NegativeValue_ShouldFail() { var result = Paged <int> .TryCreate(-1, new List <int>().ToImmutableList()); result.IsFailure.ShouldBeTrue(); }
public void NonNegativeValue_ShouldSucceed() { var result = Paged <int> .TryCreate(0, new List <int>().ToImmutableList()); result.IsSuccess.ShouldBeTrue(); }