TestGetLogAxisGridlineValues() { Single [] afGridlineValues = ChartUtil.GetLogAxisGridlineValues(0.3F, 103.0F); Assert.AreEqual(5, afGridlineValues.Length); Assert.AreEqual(0.1F, afGridlineValues[0]); Assert.AreEqual(1.0F, afGridlineValues[1]); Assert.AreEqual(10.0F, afGridlineValues[2]); Assert.AreEqual(100.0F, afGridlineValues[3]); Assert.AreEqual(1000.0F, afGridlineValues[4]); }
TestGetLogAxisGridlineValues() { Double [] adGridlineValues = ChartUtil.GetLogAxisGridlineValues(0.3, 103.0); Assert.AreEqual(5, adGridlineValues.Length); Assert.AreEqual(0.1, adGridlineValues[0]); Assert.AreEqual(1.0, adGridlineValues[1]); Assert.AreEqual(10.0, adGridlineValues[2]); Assert.AreEqual(100.0, adGridlineValues[3]); Assert.AreEqual(1000.0, adGridlineValues[4]); }
TestGetLogAxisGridlineValues6() { // Backward values. Double [] adGridlineValues = ChartUtil.GetLogAxisGridlineValues(103.0, 0.3); Assert.AreEqual(5, adGridlineValues.Length); Assert.AreEqual(0.1, adGridlineValues[0]); Assert.AreEqual(1.0, adGridlineValues[1]); Assert.AreEqual(10.0, adGridlineValues[2]); Assert.AreEqual(100.0, adGridlineValues[3]); Assert.AreEqual(1000.0, adGridlineValues[4]); }
TestGetLogAxisGridlineValues5() { Double [] adGridlineValues = ChartUtil.GetLogAxisGridlineValues(0.119, 138495.24); Assert.AreEqual(8, adGridlineValues.Length); Assert.AreEqual(0.1, adGridlineValues[0]); Assert.AreEqual(1.0, adGridlineValues[1]); Assert.AreEqual(10.0, adGridlineValues[2]); Assert.AreEqual(100.0, adGridlineValues[3]); Assert.AreEqual(1000.0, adGridlineValues[4]); Assert.AreEqual(10000.0, adGridlineValues[5]); Assert.AreEqual(100000.0, adGridlineValues[6]); Assert.AreEqual(1000000.0, adGridlineValues[7]); }
TestGetLogAxisGridlineValues5() { Single [] afGridlineValues = ChartUtil.GetLogAxisGridlineValues(0.119F, 138495.24F); Assert.AreEqual(8, afGridlineValues.Length); Assert.AreEqual(0.1F, afGridlineValues[0]); Assert.AreEqual(1.0F, afGridlineValues[1]); Assert.AreEqual(10.0F, afGridlineValues[2]); Assert.AreEqual(100.0F, afGridlineValues[3]); Assert.AreEqual(1000.0F, afGridlineValues[4]); Assert.AreEqual(10000.0F, afGridlineValues[5]); Assert.AreEqual(100000.0F, afGridlineValues[6]); Assert.AreEqual(1000000.0F, afGridlineValues[7]); }
TestGetLogAxisGridlineValuesBad4() { try { Double [] adGridlineValues = ChartUtil.GetLogAxisGridlineValues(0, 1.0); } catch (InvalidOperationException oInvalidOperationException) { Assert.AreEqual( "ChartUtil.GetLogAxisGridlineValues: limit1 value must be" + " > 0 when using log scaling." , oInvalidOperationException.Message ); throw; } }
TestGetLogAxisGridlineValuesBad3() { try { Single [] afGridlineValues = ChartUtil.GetLogAxisGridlineValues(0F, 1.0F); } catch (InvalidOperationException oInvalidOperationException) { Assert.AreEqual( "ChartUtil.GetLogAxisGridlineValues: Minimum value must be" + " > 0 when using log scaling." , oInvalidOperationException.Message ); throw; } }