main
1using gorilla.commons.utility;
2
3namespace tests.unit.commons.utility
4{
5 [Concern(typeof (NumericConversions))]
6 public class when_converting_a_valid_string_to_a_long : concerns
7 {
8 it should_return_the_correct_result = () => result.should_be_equal_to(88L);
9
10 context c = () =>
11 {
12 valid_numeric_string = "88";
13 };
14
15 because b = () =>
16 {
17 result = valid_numeric_string.to_long();
18 };
19
20 static long result;
21 static string valid_numeric_string;
22 }
23
24 [Concern(typeof (NumericConversions))]
25 public class when_converting_a_valid_string_to_an_int : concerns
26 {
27 it should_return_the_correct_result = () => result.should_be_equal_to(66);
28
29 context c = () =>
30 {
31 valid_numeric_string = "66";
32 };
33
34 because b = () =>
35 {
36 result = valid_numeric_string.to_int();
37 };
38
39 static int result;
40 static string valid_numeric_string;
41 }
42}