PerfectNumbersTest.cs

// This file was auto-generated based on version 1.0.1 of the canonical data.usingXunit;usingSystem;publicclassPerfectNumbersTest{[Fact]publicvoidSmallest_perfect_number_is_classified_correctly(){Assert.Equal(Classification.Perfect,PerfectNumbers.Classify(6));}[Fact(Skip="Remove to run test")]publicvoidMedium_perfect_number_is_classified_correctly(){Assert.Equal(Classification.Perfect,PerfectNumbers.Classify(28));}[Fact(Skip="Remove to run test")]publicvoidLarge_perfect_number_is_classified_correctly(){Assert.Equal(Classification.Perfect,PerfectNumbers.Classify(33550336));}[Fact(Skip="Remove to run test")]publicvoidSmallest_abundant_number_is_classified_correctly(){Assert.Equal(Classification.Abundant,PerfectNumbers.Classify(12));}[Fact(Skip="Remove to run test")]publicvoidMedium_abundant_number_is_classified_correctly(){Assert.Equal(Classification.Abundant,PerfectNumbers.Classify(30));}[Fact(Skip="Remove to run test")]publicvoidLarge_abundant_number_is_classified_correctly(){Assert.Equal(Classification.Abundant,PerfectNumbers.Classify(33550335));}[Fact(Skip="Remove to run test")]publicvoidSmallest_prime_deficient_number_is_classified_correctly(){Assert.Equal(Classification.Deficient,PerfectNumbers.Classify(2));}[Fact(Skip="Remove to run test")]publicvoidSmallest_non_prime_deficient_number_is_classified_correctly(){Assert.Equal(Classification.Deficient,PerfectNumbers.Classify(4));}[Fact(Skip="Remove to run test")]publicvoidMedium_deficient_number_is_classified_correctly(){Assert.Equal(Classification.Deficient,PerfectNumbers.Classify(32));}[Fact(Skip="Remove to run test")]publicvoidLarge_deficient_number_is_classified_correctly(){Assert.Equal(Classification.Deficient,PerfectNumbers.Classify(33550337));}[Fact(Skip="Remove to run test")]publicvoidEdge_case_no_factors_other_than_itself_is_classified_correctly(){Assert.Equal(Classification.Deficient,PerfectNumbers.Classify(1));}[Fact(Skip="Remove to run test")]publicvoidZero_is_rejected_not_a_natural_number_(){Assert.Throws<ArgumentOutOfRangeException>(()=>PerfectNumbers.Classify(0));}[Fact(Skip="Remove to run test")]publicvoidNegative_integer_is_rejected_not_a_natural_number_(){Assert.Throws<ArgumentOutOfRangeException>(()=>PerfectNumbers.Classify(-1));}}