Namespace: DeltaEngine.Content.Tests
Assembly: DeltaEngine.Content.Tests (in DeltaEngine.Content.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Content.Tests (in DeltaEngine.Content.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test] public void CheckWarningForAlpha() { var imageCreationData = new ImageCreationData(new Size(12, 12)); var image = ContentLoader.Create<MockImage>(imageCreationData); image.BlendMode = BlendMode.Normal; var mockLogger = new MockLogger(); image.CheckAlphaIsCorrect(false); Assert.IsTrue( mockLogger.LastMessage.Contains( "is supposed to have alpha pixels, but the image pixel format is not using alpha.")); image.BlendMode = BlendMode.Opaque; image.CheckAlphaIsCorrect(true); Assert.IsTrue( mockLogger.LastMessage.Contains( "is supposed to have no alpha pixels, but the image pixel format is using alpha.")); }
See Also