public void MoreCategories() { var distributor = new Distributor(CreateWishes(new[] { 2, 2, 2, 2 })); Assert.IsTrue(distributor.IsEnoughWishes(0)); Assert.IsTrue(distributor.IsEnoughWishes(32)); Assert.IsFalse(distributor.IsEnoughWishes(33)); }
public void UpToThreeCategories() { var distributor = new Distributor(CreateWishes(new[] { 1 })); Assert.IsTrue(distributor.IsEnoughWishes(0)); Assert.IsFalse(distributor.IsEnoughWishes(1)); distributor = new Distributor(CreateWishes(new[] { 2, 2 })); Assert.IsFalse(distributor.IsEnoughWishes(1)); distributor = new Distributor(CreateWishes(new[] { 2, 2, 1 })); Assert.IsTrue(distributor.IsEnoughWishes(1)); distributor = new Distributor(CreateWishes(new[] { 2, 2, 1 })); Assert.IsTrue(distributor.IsEnoughWishes(4)); Assert.IsFalse(distributor.IsEnoughWishes(5)); }