public void TestMapInverseWithNullValue()
        {
            var map    = new DateTimeToAxisMap(DateTime.MinValue, DateTime.MaxValue, 0d, 1d, SortOrder.Ascending);
            var result = map.MapInverse(null);

            Assert.That(result, Is.Null);
        }
        public void TestMapInverseWithOutOfRangeValues(double value, string expected)
        {
            var map          = new DateTimeToAxisMap(DateTime.MinValue, DateTime.MaxValue, 0d, 1d, SortOrder.Ascending);
            var expectedDate = DateTime.Parse(expected);
            var result       = map.MapInverse(value);

            Assert.That(result, Is.EqualTo(expectedDate).Within(TimeSpan.FromMilliseconds(1)));
        }
        public void TestMapInverseWithMillisecondValues(double value, string expected)
        {
            var min          = DateTime.Parse("1/1/0001 00:00:00.000");
            var max          = DateTime.Parse("1/1/0001 00:00:01.000");
            var map          = new DateTimeToAxisMap(min, max, 0d, 1d, SortOrder.Ascending);
            var expectedDate = DateTime.Parse(expected);
            var result       = map.MapInverse(value);

            Assert.That(result, Is.EqualTo(expectedDate));
        }