Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        public void InValidSkipValue_ShouldFail()
        {
            var result = TopSkip.TryCreate(-1, 10, (NonEmptyString)"Value", (NonEmptyString)"Value");

            result.IsFailure.ShouldBeTrue();
        }
Example #4
0
        public void InValidTopValue_ShouldFail([Values(0, Const.MaxTopSize + 1)] int top)
        {
            var result = TopSkip.TryCreate(0, top, (NonEmptyString)"Value", (NonEmptyString)"Value");

            result.IsFailure.ShouldBeTrue();
        }
Example #5
0
        public void ValidValuesMaxTop_ShouldSucceed()
        {
            var result = TopSkip.TryCreate(0, Const.MaxTopSize, (NonEmptyString)"Value", (NonEmptyString)"Value");

            result.IsSuccess.ShouldBeTrue();
        }
Example #6
0
 private static TopSkip GetValidTopSkip()
 {
     return(Extensions.GetValue(() => TopSkip.TryCreate(20, 20, (NonEmptyString)nameof(TopSkip.Top), (NonEmptyString)nameof(TopSkip.Skip))));
 }