public void StripePattern_ShouldBeConstantInZ() { var pattern = new Stripe(white, black); Assert.Equal(white, pattern.PatternAt(new Point(0, 0, 0))); Assert.Equal(white, pattern.PatternAt(new Point(0, 0, 1))); Assert.Equal(white, pattern.PatternAt(new Point(0, 0, 2))); }
public void StripePattern_ShouldAlternateInX() { var pattern = new Stripe(white, black); Assert.Equal(white, pattern.PatternAt(new Point(0, 0, 0))); Assert.Equal(white, pattern.PatternAt(new Point(0.9, 0, 0))); Assert.Equal(black, pattern.PatternAt(new Point(1, 0, 0))); Assert.Equal(black, pattern.PatternAt(new Point(-0.1, 0, 0))); Assert.Equal(black, pattern.PatternAt(new Point(-1, 0, 0))); Assert.Equal(white, pattern.PatternAt(new Point(-1.1, 0, 0))); }