|
1 | | -using System; |
2 | 1 | using Xunit; |
3 | 2 |
|
4 | 3 | public class PerfectNumbersTests |
5 | 4 | { |
6 | 5 | [Fact] |
7 | | - public void Smallest_perfect_number_is_classified_correctly() |
| 6 | + public void PerfectNumbersSmallestPerfectNumberIsClassifiedCorrectly() |
8 | 7 | { |
9 | 8 | Assert.Equal(Classification.Perfect, PerfectNumbers.Classify(6)); |
10 | 9 | } |
11 | 10 |
|
12 | 11 | [Fact(Skip = "Remove this Skip property to run this test")] |
13 | | - public void Medium_perfect_number_is_classified_correctly() |
| 12 | + public void PerfectNumbersMediumPerfectNumberIsClassifiedCorrectly() |
14 | 13 | { |
15 | 14 | Assert.Equal(Classification.Perfect, PerfectNumbers.Classify(28)); |
16 | 15 | } |
17 | 16 |
|
18 | 17 | [Fact(Skip = "Remove this Skip property to run this test")] |
19 | | - public void Large_perfect_number_is_classified_correctly() |
| 18 | + public void PerfectNumbersLargePerfectNumberIsClassifiedCorrectly() |
20 | 19 | { |
21 | 20 | Assert.Equal(Classification.Perfect, PerfectNumbers.Classify(33550336)); |
22 | 21 | } |
23 | 22 |
|
24 | 23 | [Fact(Skip = "Remove this Skip property to run this test")] |
25 | | - public void Smallest_abundant_number_is_classified_correctly() |
| 24 | + public void AbundantNumbersSmallestAbundantNumberIsClassifiedCorrectly() |
26 | 25 | { |
27 | 26 | Assert.Equal(Classification.Abundant, PerfectNumbers.Classify(12)); |
28 | 27 | } |
29 | 28 |
|
30 | 29 | [Fact(Skip = "Remove this Skip property to run this test")] |
31 | | - public void Medium_abundant_number_is_classified_correctly() |
| 30 | + public void AbundantNumbersMediumAbundantNumberIsClassifiedCorrectly() |
32 | 31 | { |
33 | 32 | Assert.Equal(Classification.Abundant, PerfectNumbers.Classify(30)); |
34 | 33 | } |
35 | 34 |
|
36 | 35 | [Fact(Skip = "Remove this Skip property to run this test")] |
37 | | - public void Large_abundant_number_is_classified_correctly() |
| 36 | + public void AbundantNumbersLargeAbundantNumberIsClassifiedCorrectly() |
38 | 37 | { |
39 | 38 | Assert.Equal(Classification.Abundant, PerfectNumbers.Classify(33550335)); |
40 | 39 | } |
41 | 40 |
|
42 | 41 | [Fact(Skip = "Remove this Skip property to run this test")] |
43 | | - public void Smallest_prime_deficient_number_is_classified_correctly() |
| 42 | + public void DeficientNumbersSmallestPrimeDeficientNumberIsClassifiedCorrectly() |
44 | 43 | { |
45 | 44 | Assert.Equal(Classification.Deficient, PerfectNumbers.Classify(2)); |
46 | 45 | } |
47 | 46 |
|
48 | 47 | [Fact(Skip = "Remove this Skip property to run this test")] |
49 | | - public void Smallest_non_prime_deficient_number_is_classified_correctly() |
| 48 | + public void DeficientNumbersSmallestNonPrimeDeficientNumberIsClassifiedCorrectly() |
50 | 49 | { |
51 | 50 | Assert.Equal(Classification.Deficient, PerfectNumbers.Classify(4)); |
52 | 51 | } |
53 | 52 |
|
54 | 53 | [Fact(Skip = "Remove this Skip property to run this test")] |
55 | | - public void Medium_deficient_number_is_classified_correctly() |
| 54 | + public void DeficientNumbersMediumDeficientNumberIsClassifiedCorrectly() |
56 | 55 | { |
57 | 56 | Assert.Equal(Classification.Deficient, PerfectNumbers.Classify(32)); |
58 | 57 | } |
59 | 58 |
|
60 | 59 | [Fact(Skip = "Remove this Skip property to run this test")] |
61 | | - public void Large_deficient_number_is_classified_correctly() |
| 60 | + public void DeficientNumbersLargeDeficientNumberIsClassifiedCorrectly() |
62 | 61 | { |
63 | 62 | Assert.Equal(Classification.Deficient, PerfectNumbers.Classify(33550337)); |
64 | 63 | } |
65 | 64 |
|
66 | 65 | [Fact(Skip = "Remove this Skip property to run this test")] |
67 | | - public void Edge_case_no_factors_other_than_itself_is_classified_correctly() |
| 66 | + public void DeficientNumbersEdgeCaseNoFactorsOtherThanItselfIsClassifiedCorrectly() |
68 | 67 | { |
69 | 68 | Assert.Equal(Classification.Deficient, PerfectNumbers.Classify(1)); |
70 | 69 | } |
71 | 70 |
|
72 | 71 | [Fact(Skip = "Remove this Skip property to run this test")] |
73 | | - public void Zero_is_rejected_as_it_is_not_a_positive_integer_() |
| 72 | + public void InvalidInputsZeroIsRejectedAsItIsNotAPositiveInteger() |
74 | 73 | { |
75 | 74 | Assert.Throws<ArgumentOutOfRangeException>(() => PerfectNumbers.Classify(0)); |
76 | 75 | } |
77 | 76 |
|
78 | 77 | [Fact(Skip = "Remove this Skip property to run this test")] |
79 | | - public void Negative_integer_is_rejected_as_it_is_not_a_positive_integer_() |
| 78 | + public void InvalidInputsNegativeIntegerIsRejectedAsItIsNotAPositiveInteger() |
80 | 79 | { |
81 | 80 | Assert.Throws<ArgumentOutOfRangeException>(() => PerfectNumbers.Classify(-1)); |
82 | 81 | } |
|
0 commit comments