public IEnumerator GetEnumerator() { yield return(CreateTestCase( CellCreationHelper.CreateCell(10, 0, 0, 0, true), CellCreationHelper.CreateCell(10, 2.5f, 0, 0, true), false, "Colliding inside and is not allowed on line", true)); yield return(CreateTestCase( CellCreationHelper.CreateCell(10, 0, 0, 0), CellCreationHelper.CreateCell(10, 0, 0, (float)Math.Sqrt(3) * 10), false, "Colliding on line and is not allowed on line", true)); yield return(CreateTestCase( CellCreationHelper.CreateCell(10, 0, 0, 0), CellCreationHelper.CreateCell(10, 0, 0, (float)Math.Sqrt(3) * 10), true, "Colliding on line and is allowed on line", false)); yield return(CreateTestCase( CellCreationHelper.CreateCell(10, 0, 0, 0), CellCreationHelper.CreateCell(10, 0, 0, (float)Math.Sqrt(3) * 10 + 1), true, "Not Colliding and is allowed on line", false)); yield return(CreateTestCase( CellCreationHelper.CreateCell(10, 0, 0, 0), CellCreationHelper.CreateCell(10, 0, 0, (float)Math.Sqrt(3) * 10 + 1), false, "Not Colliding and is not allowed on line", false)); yield return(CreateTestCase( CellCreationHelper.CreateCell(10, 0, 0, 0, true), CellCreationHelper.CreateCell(10, 10, 0, 0, true), true, "Whole side is on colliding side and is allowed on line", false)); yield return(CreateTestCase( CellCreationHelper.CreateCell(10, 0, 0, 0, true), CellCreationHelper.CreateCell(10, 10, 0, 0, true), false, "Whole side is on colliding side and is not allowed on line", true)); }
public IEnumerator GetEnumerator() { yield return(new TestCaseData(CellCreationHelper.CreateCell(10, 0, 0, 0, true), CellCreationHelper.CreateCell(10, 2.5F, 0, 2.5F, true), false).Returns(false)); yield return(new TestCaseData(CellCreationHelper.CreateCell(10, 0, 0, 0, true), CellCreationHelper.CreateCell(10, 2.5F, 0, 2.5F, true), true).Returns(true)); yield return(new TestCaseData(CellCreationHelper.CreateCell(10, 0, 0, 0, true), CellCreationHelper.CreateCell(10, 25, 0, 25, true), true).Returns(false)); yield return(new TestCaseData(CellCreationHelper.CreateCell(10, 0, 0, 0, true), CellCreationHelper.CreateCell(10, 0, 20, 0, true), true).Returns(false)); yield return(new TestCaseData(CellCreationHelper.CreateCell(10, 0, 0, 0, true), CellCreationHelper.CreateCell(10, 0, 20, 0, true), false).Returns(false)); yield return(new TestCaseData(CellCreationHelper.CreateCell(10, 0, 0, 0, true), CellCreationHelper.CreateCell(10, 0, 10, 0, true), false).Returns(true)); yield return(new TestCaseData(CellCreationHelper.CreateCell(10, 0, 0, 0, true), CellCreationHelper.CreateCell(10, 0, 10, 0, true), true).Returns(true)); }