示例#1
0
        public void it_should_return_the_specified_default_when_parsing_fails()
        {
            int i = Int32Parser.ParseInt32("xxx", int.MinValue);

            i.Should().Be(int.MinValue);
        }
示例#2
0
        public void it_should_parse_1_correctly()
        {
            int i = Int32Parser.ParseInt32("1");

            i.Should().Be(1);
        }
示例#3
0
        public void it_should_return_0_when_parsing_fails()
        {
            int i = Int32Parser.ParseInt32("xxx");

            i.Should().Be(0);
        }
示例#4
0
        public void it_should_parse_4th_correctly()
        {
            int i = Int32Parser.ParseInt32("4th");

            i.Should().Be(4);
        }
示例#5
0
        public void it_should_parse_3rd_correctly()
        {
            int i = Int32Parser.ParseInt32("3rd");

            i.Should().Be(3);
        }
示例#6
0
        public void it_should_parse_2nd_correctly()
        {
            int i = Int32Parser.ParseInt32("2nd");

            i.Should().Be(2);
        }
示例#7
0
        public void it_should_parse_negative_1_correctly()
        {
            int i = Int32Parser.ParseInt32("-1");

            i.Should().Be(-1);
        }