Example #1
0
        public void MetadataBinderProcessTopWithNegativeNumberShouldThrow()
        {
            Action metadataBinderAction = () => MetadataBinder.ProcessTop(-1);

            metadataBinderAction.ShouldThrow <ODataException>().WithMessage(
                ODataErrorStrings.MetadataBinder_TopRequiresNonNegativeInteger("-1"));
        }
Example #2
0
        public void MetadataBinderProcessTopWithPositiveNumberShouldReturnNumber()
        {
            long?result = MetadataBinder.ProcessTop(1);

            result.Should().Be(1);
        }
Example #3
0
        public void MetadataBinderProcessTopWithPositiveNumberShouldReturnNumber()
        {
            long?result = MetadataBinder.ProcessTop(1);

            Assert.Equal(1, result);
        }
Example #4
0
        public void MetadataBinderProcessTopWithNullReturnsNull()
        {
            long?result = MetadataBinder.ProcessTop(null);

            result.Should().Be(null);
        }
Example #5
0
        public void MetadataBinderProcessTopWithNullReturnsNull()
        {
            long?result = MetadataBinder.ProcessTop(null);

            Assert.Null(result);
        }