public void TwoTopSkipsWithDifferentSkipShouldNotBeEqual() { var r1 = TopSkip.TryCreate(1, 1, (NonEmptyString)"Value", (NonEmptyString)"Value"); var r2 = TopSkip.TryCreate(0, 1, (NonEmptyString)"Value", (NonEmptyString)"Value"); Helper.ShouldNotBeEqual(r1, r2); }
public void TwoTopSkipsWithSameValueShouldBeEqual() { var r1 = TopSkip.TryCreate(0, 10, (NonEmptyString)"Value", (NonEmptyString)"Value"); var r2 = TopSkip.TryCreate(0, 10, (NonEmptyString)"Value", (NonEmptyString)"Value"); Helper.ShouldBeEqual(r1, r2); }
public void InValidSkipValue_ShouldFail() { var result = TopSkip.TryCreate(-1, 10, (NonEmptyString)"Value", (NonEmptyString)"Value"); result.IsFailure.ShouldBeTrue(); }
public void InValidTopValue_ShouldFail([Values(0, Const.MaxTopSize + 1)] int top) { var result = TopSkip.TryCreate(0, top, (NonEmptyString)"Value", (NonEmptyString)"Value"); result.IsFailure.ShouldBeTrue(); }
public void ValidValuesMaxTop_ShouldSucceed() { var result = TopSkip.TryCreate(0, Const.MaxTopSize, (NonEmptyString)"Value", (NonEmptyString)"Value"); result.IsSuccess.ShouldBeTrue(); }
private static TopSkip GetValidTopSkip() { return(Extensions.GetValue(() => TopSkip.TryCreate(20, 20, (NonEmptyString)nameof(TopSkip.Top), (NonEmptyString)nameof(TopSkip.Skip)))); }