Example #1
0
        public static int[] Convert(Plant.Grootte plantGrootte)
        {
            string description = EnumDescriptionConverter.GetDescriptionFromEnum(plantGrootte);

            description = description.Replace("- ", "");
            string[] split = description.Split(' ');
            return(new int[] { System.Convert.ToInt32(split[0]), System.Convert.ToInt32(split[1]) });
        }
Example #2
0
 public static int GetPlantGrootteId(Plant.Grootte plantGrootte)
 {
     return((int)plantGrootte + 1);
 }
 public void TestNumbersToEnum()
 {
     Plant.Grootte plantGrootte = ConvertPlantGrootte.Convert(120, 140);
     Assert.AreEqual(Plant.Grootte.G120140, plantGrootte);
 }