main
 1using Gorilla.Commons.Utility;
 2
 3namespace tests.unit.commons.utility
 4{
 5    [Concern(typeof (Percent))]
 6    public class when_comparing_fifty_divided_by_one_hundred_to_fifty_percent : concerns
 7    {
 8        it they_should_be_equal = () => new Percent(50, 100).should_be_equal_to(50);
 9    }
10
11    [Concern(typeof (Percent))]
12    public class when_calculating_a_fractional_percentage : concerns
13    {
14        it should_return_the_correct_percentage = () => new Percent(30, 90).should_be_equal_to(33.3);
15    }
16
17    [Concern(typeof (Percent))]
18    public class when_checking_if_50_percent_is_less_than_51_percent : concerns
19    {
20        it should_return_true = () => new Percent(50).is_less_than(new Percent(51)).should_be_true();
21    }
22
23    [Concern(typeof (Percent))]
24    public class when_checking_if_51_percent_is_less_than_50_percent : concerns
25    {
26        it should_return_false = () => new Percent(51).is_less_than(new Percent(50)).should_be_false();
27    }
28
29    [Concern(typeof (Percent))]
30    public class when_checking_if_50_percent_is_less_than_50_percent : concerns
31    {
32        it should_return_false = () => new Percent(50).is_less_than(new Percent(50)).should_be_false();
33    }
34}