public static IEnumerable<object[]> AllCombinationsOfThreeBools() { var bools = new[] { true, false }; foreach (var one in bools) foreach (var two in bools) foreach (var three in bools) yield return new object[] { one, two, three }; } }