Exemple #1
0
 private static void AssertDistanceInfos <T>(IDrop2GDistanceInfo <T> source, T[] dest)
 {
     Assert.AreEqual(source.DistanceTo200Info, dest[0]);
     Assert.AreEqual(source.DistanceTo400Info, dest[1]);
     Assert.AreEqual(source.DistanceTo600Info, dest[2]);
     Assert.AreEqual(source.DistanceTo800Info, dest[3]);
     Assert.AreEqual(source.DistanceTo1000Info, dest[4]);
     Assert.AreEqual(source.DistanceTo1200Info, dest[5]);
     Assert.AreEqual(source.DistanceTo1400Info, dest[6]);
     Assert.AreEqual(source.DistanceTo1600Info, dest[7]);
     Assert.AreEqual(source.DistanceTo1800Info, dest[8]);
     Assert.AreEqual(source.DistanceTo2000Info, dest[9]);
     Assert.AreEqual(source.DistanceTo2200Info, dest[10]);
     Assert.AreEqual(source.DistanceTo2400Info, dest[11]);
     Assert.AreEqual(source.DistanceTo2600Info, dest[12]);
     Assert.AreEqual(source.DistanceTo2800Info, dest[13]);
     Assert.AreEqual(source.DistanceTo3000Info, dest[14]);
     Assert.AreEqual(source.DistanceTo4000Info, dest[15]);
     Assert.AreEqual(source.DistanceTo5000Info, dest[16]);
     Assert.AreEqual(source.DistanceTo6000Info, dest[17]);
     Assert.AreEqual(source.DistanceTo7000Info, dest[18]);
     Assert.AreEqual(source.DistanceTo8000Info, dest[19]);
     Assert.AreEqual(source.DistanceTo9000Info, dest[20]);
     Assert.AreEqual(source.DistanceToInfInfo, dest[21]);
 }
 public static void AssertDistanceTest <TValue>(this IDrop2GDistanceInfo <TValue> info, TValue[] expectedValues)
 {
     Assert.IsNotNull(info);
     Assert.AreEqual(info.DistanceTo200Info, expectedValues[0]);
     Assert.AreEqual(info.DistanceTo400Info, expectedValues[1]);
     Assert.AreEqual(info.DistanceTo600Info, expectedValues[2]);
     Assert.AreEqual(info.DistanceTo800Info, expectedValues[3]);
     Assert.AreEqual(info.DistanceTo1000Info, expectedValues[4]);
     Assert.AreEqual(info.DistanceTo1200Info, expectedValues[5]);
     Assert.AreEqual(info.DistanceTo1400Info, expectedValues[6]);
     Assert.AreEqual(info.DistanceTo1600Info, expectedValues[7]);
     Assert.AreEqual(info.DistanceTo1800Info, expectedValues[8]);
     Assert.AreEqual(info.DistanceTo2000Info, expectedValues[9]);
     Assert.AreEqual(info.DistanceTo2200Info, expectedValues[10]);
     Assert.AreEqual(info.DistanceTo2400Info, expectedValues[11]);
     Assert.AreEqual(info.DistanceTo2600Info, expectedValues[12]);
     Assert.AreEqual(info.DistanceTo2800Info, expectedValues[13]);
     Assert.AreEqual(info.DistanceTo3000Info, expectedValues[14]);
     Assert.AreEqual(info.DistanceTo4000Info, expectedValues[15]);
     Assert.AreEqual(info.DistanceTo5000Info, expectedValues[16]);
     Assert.AreEqual(info.DistanceTo6000Info, expectedValues[17]);
     Assert.AreEqual(info.DistanceTo7000Info, expectedValues[18]);
     Assert.AreEqual(info.DistanceTo8000Info, expectedValues[19]);
     Assert.AreEqual(info.DistanceTo9000Info, expectedValues[20]);
     Assert.AreEqual(info.DistanceToInfInfo, expectedValues[21]);
 }
Exemple #3
0
        public static TInfo GenerateDistanceInfo <TInfo, TValue>(
            this IDrop2GDistanceInfo <string> csvStat)
            where TInfo : class, IDrop2GDistanceInfo <TValue>, new()
        {
            TInfo info = new TInfo();

            csvStat.ConvertProperties <IDrop2GDistanceInfo <string>, IDrop2GDistanceInfo <TValue> >(info);
            return(info);
        }