using UnitTestSharp; using Prism; namespace Glass.Blacklight.UnitTests { public class BaseTintTests : TestFixture { public static BaseTint Tint() { return new BaseTint { Color = Colors.White, Gamma = 1.4, Look = TintLookTests.LookWith(null), }; } public class MatchesTests : TestFixture { public void SameColorGammaAndLook_Match() { CheckTrue(Tint().Matches(Tint())); } public void DifferentColor_DoNotMatch() { BaseTint other = Tint(); other.Color = Colors.Red; CheckFalse(Tint().Matches(other)); } public void SameColorByAnotherName_Match() { BaseTint named = Tint(); named.Color = Colors.Red; BaseTint unnamed = Tint(); unnamed.Color = Color.FromArgb(255, 255, 0, 0); CheckTrue(named.Matches(unnamed)); } public void DifferentGamma_DoNotMatch() { BaseTint other = Tint(); other.Gamma = 2; CheckFalse(Tint().Matches(other)); } public void DifferentLook_DoNotMatch() { BaseTint other = Tint(); other.Look = TintLookTests.LookWith(new BlacklightGlassTexture()); CheckFalse(Tint().Matches(other)); } } } }