public void InitializeTest()
    {
      ID15Reader catchme = new ID15Reader(); 
      catchme.LoadCatchments(@"D:\DK_information\TestData\FileStructure\id15_NSTmodel.shp");


      AtmosphericDeposition target = new AtmosphericDeposition(); 
      DateTime Start = new DateTime(); 
      DateTime End = new DateTime();
      target.Shapefile = new SafeFile() { FileName = @"D:\DK_information\TestData\FileStructure\Ndeposition\EMEP_centroid_DK.shp" };
      target.ExcelFile = new SafeFile() { FileName = @"D:\DK_information\TestData\FileStructure\Ndeposition\EMEP_Ndep_1990_2013.xlsx" };
      target.Initialize(Start, End, catchme.AllCatchments.Values);

      //TODO: Add precipitation for this to work

      Assert.AreEqual(0.0144132844, target.GetValue(catchme.AllCatchments.Values.First(), new DateTime(1990, 5, 1)),1e-6);
    }
 public static ISource GetSourceModel(string ModelID)
 {
   ISource NewModel = null;
   switch (ModelID)
   {
     case "Atmospheric":
       NewModel = new AtmosphericDeposition();
       break;
     case "GroundwaterSource":
       NewModel = new GroundWaterSource();
       break;
     case "PointSource":
       NewModel = new PointSource();
       break;
     case "OrganicN":
       NewModel = new OrganicN();
       break;
   }
   return NewModel;
 }
Beispiel #3
0
        public static ISource GetSourceModel(string ModelID)
        {
            ISource NewModel = null;

            switch (ModelID)
            {
            case "Atmospheric":
                NewModel = new AtmosphericDeposition();
                break;

            case "GroundwaterSource":
                NewModel = new GroundWaterSource();
                break;

            case "PointSource":
                NewModel = new PointSource();
                break;

            case "OrganicN":
                NewModel = new OrganicN();
                break;
            }
            return(NewModel);
        }