예제 #1
0
        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);
        }
예제 #2
0
 private Query(OrderByTopSkip orderByTopSkip, Guid commandId)
     : base(commandId)
 {
     OrderByTopSkip = orderByTopSkip;
 }
예제 #3
0
        public void InValidSkipValue_ShouldFail()
        {
            var result = OrderByTopSkip.TryCreate(GetOrderByCollection(new List <OrderBy>().ToImmutableList()), -1, 1, (NonEmptyString)"Value", (NonEmptyString)"Value");

            result.IsFailure.ShouldBeTrue();
        }
예제 #4
0
        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();
        }
예제 #5
0
        public void ValidValuesMaxTop_ShouldSucceed()
        {
            var result = OrderByTopSkip.TryCreate(GetOrderByCollection(new List <OrderBy>().ToImmutableList()), 0, Const.MaxTopSize, (NonEmptyString)"Value", (NonEmptyString)"Value");

            result.IsSuccess.ShouldBeTrue();
        }