ListParameters() 공개 메소드

public ListParameters ( ) : string>.IDictionary
리턴 string>.IDictionary
예제 #1
0
 public void RangeRule_Takes_Min_And_Max_DateTimes()
 {
     var rule = new RangeRule(new DateTime(2001,10, 20, 01, 02, 03), new DateTime(2003, 3, 5));
     var parameters = rule.ListParameters();
     Assert.Equal(13, parameters.Count);
     Assert.Equal("2001", parameters["MinYear"]);
     Assert.Equal("10", parameters["MinMonth"]);
     Assert.Equal("20", parameters["MinDay"]);
     Assert.Equal("1", parameters["MinHour"]);
     Assert.Equal("2", parameters["MinMinute"]);
     Assert.Equal("3", parameters["MinSecond"]);
     Assert.Equal("2003", parameters["MaxYear"]);
     Assert.Equal("3", parameters["MaxMonth"]);
     Assert.Equal("5", parameters["MaxDay"]);
     Assert.Equal("0", parameters["MaxHour"]);
     Assert.Equal("0", parameters["MaxMinute"]);
     Assert.Equal("0", parameters["MaxSecond"]);
     Assert.Equal("datetime", parameters["Type"]);
 }
예제 #2
0
 public void RangeRule_Takes_Min_And_Max_Ints()
 {
     var rule = new RangeRule(1, 5);
     var parameters = rule.ListParameters();
     Assert.Equal(3, parameters.Count);
     Assert.Equal("1", parameters["Min"]);
     Assert.Equal("5", parameters["Max"]);
     Assert.Equal("integer", parameters["Type"]);
 }
예제 #3
0
 public void RangeRule_Takes_Min_And_Max_Strings()
 {
     var rule = new RangeRule("abc", "xyz");
     var parameters = rule.ListParameters();
     Assert.Equal(3, parameters.Count);
     Assert.Equal("abc", parameters["Min"]);
     Assert.Equal("xyz", parameters["Max"]);
     Assert.Equal("string", parameters["Type"]);
 }
예제 #4
0
 public void RangeRule_Takes_Min_And_Max_Decimals()
 {
     var rule = new RangeRule(1.2m, 5.4m);
     var parameters = rule.ListParameters();
     Assert.Equal(3, parameters.Count);
     Assert.Equal("1.2", parameters["Min"]);
     Assert.Equal("5.4", parameters["Max"]);
     Assert.Equal("decimal", parameters["Type"]);
 }