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

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

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

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

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

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

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