public void IsValidBitCount() { foreach (var bitCount in ImageHeader.ValidBitCounts) { Assert.IsTrue(ImageHeader.IsValidBitCount(bitCount)); } Assert.IsFalse(ImageHeader.IsValidBitCount(3)); // Test non-static version of function ImageHeader imageHeader = new ImageHeader(); imageHeader.bitCount = 1; Assert.IsTrue(imageHeader.IsValidBitCount()); imageHeader.bitCount = 3; Assert.IsFalse(imageHeader.IsValidBitCount()); }