public void GetPoints2Test() { var kirokuBox = new KirokuBox() { Width = 80f, Height = 40f, }; kirokuBox.SetValues ( TimeSpan.FromSeconds(60d), new [] { new MondaiResult("id0", DateTime.MinValue, TimeSpan.FromSeconds(180d), Difficulty.Normal), new MondaiResult("id0", DateTime.MinValue, TimeSpan.FromSeconds(120d), Difficulty.Normal), } ); var points = kirokuBox.GetPoints2(); Assert.AreEqual(2 * 2 + 2, points.Count()); CollectionAssert.AreEqual ( new [] { new PointF(0f, 30f), new PointF(40f, 30f), new PointF(40f, 20f), new PointF(80f, 20f), new PointF(80f, 40f), new PointF(0f, 40f), }, points ); }
public void Test1() { var kirokuBox = new KirokuBox() { Width = 80f, Height = 40f, }; kirokuBox.SetValues ( TimeSpan.FromSeconds(60d), new [] { new MondaiResult("id0", DateTime.MinValue, TimeSpan.FromSeconds(300d), Difficulty.Normal), new MondaiResult("id0", DateTime.MinValue, TimeSpan.FromSeconds(240d), Difficulty.Normal), new MondaiResult("id0", DateTime.MinValue, TimeSpan.FromSeconds(180d), Difficulty.Normal), new MondaiResult("id0", DateTime.MinValue, TimeSpan.FromSeconds(120d), Difficulty.Normal), new MondaiResult("id0", DateTime.MinValue + TimeSpan.FromSeconds(1d), TimeSpan.FromSeconds(60d), Difficulty.Normal), new MondaiResult("id0", DateTime.MinValue, TimeSpan.FromSeconds(0d), Difficulty.Normal), new MondaiResult("id0", DateTime.MinValue, TimeSpan.FromSeconds(-60d), Difficulty.Normal), } ); CollectionAssert.AreEqual ( new [] { new PointF(10f, 40f), new PointF(20f, 40f), new PointF(30f, 30f), new PointF(40f, 20f), new PointF(50f, 0f), new PointF(60f, 0f), new PointF(70f, 10f), }, kirokuBox.GetPoints() ); }