Example #1
0
        public void AddLimitTo_ToParameterAlreadyContainingLimit()
        {
            // Arrange
            IDictionary<string, string> parameters = new Dictionary<string, string>();
            parameters = parameters.LimitTo(10);

            // Assert
            Assert.Throws<ArgumentException>(() =>
                                                 {   // Act
                                                     parameters = parameters.LimitTo(20);
                                                 });
        }
Example #2
0
        public void AddLimitTo_ToExisitingParameter()
        {
            // Arrange
            IDictionary<string, string> parameters = new Dictionary<string, string>();

            // Act
            parameters = parameters.LimitTo(10);

            // Assert
            Assert.Equal(1, parameters.Count);

            Assert.Equal("10", parameters["limit"]);
        }