public void GetCompressedTest() { ColorRGB input = new ColorRGB(2.0f, 1.0f, 0.5f, 1.0f); ColorRGB expected = new ColorRGB(1.0f, 0.5f, 0.25f, 0.5f); ColorRGB actual = input.GetCompressed(); Assert.AreEqual(expected, actual); }
public void GetCompressedShouldEqualCompress() { ColorRGB input = new ColorRGB(1.5f, 0.4f, -51.5f, 0.0f); ColorRGB compress = input.GetCompressed(); input.Normalize(); bool expected = true; bool actual = compress == input; Assert.AreEqual(expected, actual); }