public void ShouldBeValidForParallelLines() { var machine = new PinballMachine(); var line1 = new Line(100, 100, 100, 200); var line2 = new Line(105, 100, 105, 200); machine.Add(line1); machine.Add(line2); Assert.IsTrue(machine.IsValid()); }
public void ShouldBeInvalidForCrossingLines() { var machine = new PinballMachine(); var line1 = new Line(100, 100, 100, 200); var line2 = new Line(50, 150, 150, 150); machine.Add(line1); machine.Add(line2); Assert.IsFalse(machine.IsValid()); }