public void TwoOrderByTopSkipsWithDifferentTopShouldNotBeEqual() { var r1 = OrderByTopSkip.TryCreate(GetOrderByCollection(new List <OrderBy>().ToImmutableList()), 1, 1, (NonEmptyString)"Value", (NonEmptyString)"Value"); var r2 = OrderByTopSkip.TryCreate(GetOrderByCollection(new List <OrderBy>().ToImmutableList()), 1, 2, (NonEmptyString)"Value", (NonEmptyString)"Value"); Helper.ShouldNotBeEqual(r1, r2); }
private Query(OrderByTopSkip orderByTopSkip, Guid commandId) : base(commandId) { OrderByTopSkip = orderByTopSkip; }
public void InValidSkipValue_ShouldFail() { var result = OrderByTopSkip.TryCreate(GetOrderByCollection(new List <OrderBy>().ToImmutableList()), -1, 1, (NonEmptyString)"Value", (NonEmptyString)"Value"); result.IsFailure.ShouldBeTrue(); }
public void InValidTopValue_ShouldFail([Values(0, Const.MaxTopSize + 1)] int top) { var result = OrderByTopSkip.TryCreate(GetOrderByCollection(new List <OrderBy>().ToImmutableList()), 0, top, (NonEmptyString)"Value", (NonEmptyString)"Value"); result.IsFailure.ShouldBeTrue(); }
public void ValidValuesMaxTop_ShouldSucceed() { var result = OrderByTopSkip.TryCreate(GetOrderByCollection(new List <OrderBy>().ToImmutableList()), 0, Const.MaxTopSize, (NonEmptyString)"Value", (NonEmptyString)"Value"); result.IsSuccess.ShouldBeTrue(); }