Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public void it_should_parse_1_correctly()
        {
            int i = Int32Parser.ParseInt32("1");

            i.Should().Be(1);
        }
Exemplo n.º 3
0
        public void it_should_return_0_when_parsing_fails()
        {
            int i = Int32Parser.ParseInt32("xxx");

            i.Should().Be(0);
        }
Exemplo n.º 4
0
        public void it_should_parse_4th_correctly()
        {
            int i = Int32Parser.ParseInt32("4th");

            i.Should().Be(4);
        }
Exemplo n.º 5
0
        public void it_should_parse_3rd_correctly()
        {
            int i = Int32Parser.ParseInt32("3rd");

            i.Should().Be(3);
        }
Exemplo n.º 6
0
        public void it_should_parse_2nd_correctly()
        {
            int i = Int32Parser.ParseInt32("2nd");

            i.Should().Be(2);
        }
Exemplo n.º 7
0
        public void it_should_parse_negative_1_correctly()
        {
            int i = Int32Parser.ParseInt32("-1");

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