public void Can_make_triplets_from_11_to_20() { var triplets = Triplet.Where(minFactor: 11, maxFactor: 20); var products = triplets.Select(x => x.Product()); Assert.That(products, Is.EqualTo(new[] { 3840 })); }
public void Can_make_triplets_filtered_on_sum() { var triplets = Triplet.Where(sum: 180, maxFactor: 100); var products = triplets.Select(x => x.Product()).OrderBy(x => x); Assert.That(products, Is.EqualTo(new[] { 118080, 168480, 202500 })); }
public void Can_make_triplets_up_to_10() { var triplets = Triplet.Where(maxFactor: 10); var products = triplets.Select(x => x.Product()).OrderBy(x => x); Assert.That(products, Is.EqualTo(new[] { 60, 480 })); }