120 lines
5.4 KiB
C#
120 lines
5.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using LeafWeb.Core.Entities;
|
|
|
|
namespace LeafWeb.WebCms.Tests.Models
|
|
{
|
|
public static class LeafInputTestData
|
|
{
|
|
public static LeafInput GetLeafInput =>
|
|
new LeafInput
|
|
{
|
|
CurrentStatus = LeafInputStatusType.Complete,
|
|
OutputFiles = new[] {new LeafOutputFile {Filename = "OutputFilename.txt"}},
|
|
Added = DateTime.Today,
|
|
Email = "test@email.com",
|
|
Identifier = "Ident I Fier",
|
|
Name = "My Name",
|
|
PhotosynthesisType = new PhotosynthesisType {Id = "1", Name = "1", SortOrder = 1},
|
|
InputFiles = new[]
|
|
{
|
|
new LeafInputFile
|
|
{
|
|
Filename = "MyFilename.ext",
|
|
Id = 3
|
|
}
|
|
},
|
|
StatusHistory = new List<LeafInputStatus>
|
|
{
|
|
new LeafInputStatus
|
|
{
|
|
DateTime = DateTime.Today.Subtract(new TimeSpan(4, 0, 0)),
|
|
Description = "Added",
|
|
Details = "Uploaded from Web",
|
|
Id = 1,
|
|
Status = LeafInputStatusType.Pending
|
|
},
|
|
new LeafInputStatus
|
|
{
|
|
DateTime = DateTime.Today.Subtract(new TimeSpan(3, 0, 0)),
|
|
Description = "Uploading input data",
|
|
Id = 2,
|
|
Status = LeafInputStatusType.Starting
|
|
},
|
|
new LeafInputStatus
|
|
{
|
|
DateTime = DateTime.Today.Subtract(new TimeSpan(2, 12, 0)),
|
|
Description = "Running on server",
|
|
Id = 3,
|
|
Status = LeafInputStatusType.Running
|
|
},
|
|
new LeafInputStatus
|
|
{
|
|
DateTime = DateTime.Today.Subtract(new TimeSpan(1, 0, 0)),
|
|
Description = "Downloading results",
|
|
Id = 4,
|
|
Status = LeafInputStatusType.Finishing
|
|
},
|
|
new LeafInputStatus
|
|
{
|
|
DateTime = DateTime.Today.Subtract(new TimeSpan(0, 12, 0)),
|
|
Description = "All done",
|
|
Id = 5,
|
|
Status = LeafInputStatusType.Complete
|
|
}
|
|
},
|
|
LeafInputData = new List<LeafInputData>
|
|
{
|
|
new LeafInputData
|
|
{
|
|
Site = SampleLeafInputDataSite,
|
|
SiteName = "MySite",
|
|
Id = 123,
|
|
Data = GetLeafInputDataCurves
|
|
}
|
|
}
|
|
};
|
|
|
|
public static LeafInputData GetLeafInputData =>
|
|
new LeafInputData
|
|
{
|
|
Site = SampleLeafInputDataSite,
|
|
SiteName = "MySite",
|
|
Id = 123,
|
|
Data = GetLeafInputDataCurves
|
|
};
|
|
|
|
public static List<LeafInputDataCurve> GetLeafInputDataCurves =>
|
|
new List<LeafInputDataCurve> {
|
|
new LeafInputDataCurve{ CO2S=292.5618317, PARi=993.0888855, Tleaf=23.53769627, PhiPS2=0.180769687 },
|
|
new LeafInputDataCurve{ CO2S=195.4142136, PARi=992.5410278, Tleaf=23.68962097, PhiPS2=0.163288942 },
|
|
new LeafInputDataCurve{ CO2S=146.4719864, PARi=992.1625671, Tleaf=23.90329285, PhiPS2=0.147352806 },
|
|
new LeafInputDataCurve{ CO2S=98.51480789, PARi=991.761908, Tleaf=24.21637478, PhiPS2=0.130597749 },
|
|
new LeafInputDataCurve{ CO2S=73.31520309, PARi=991.5204651, Tleaf=24.19524651, PhiPS2=0.122154858 },
|
|
new LeafInputDataCurve{ CO2S=49.07753906, PARi=991.50896, Tleaf=24.11649742, PhiPS2=0.11011836 },
|
|
new LeafInputDataCurve{ CO2S=389.8589264, PARi=991.5494934, Tleaf=23.77918701, PhiPS2=0.183856114 },
|
|
new LeafInputDataCurve{ CO2S=587.4440186, PARi=990.6557251, Tleaf=23.97962074, PhiPS2=0.224674063 },
|
|
new LeafInputDataCurve{ CO2S=783.7866455, PARi=990.5349609, Tleaf=24.24497566, PhiPS2=0.241833394 },
|
|
new LeafInputDataCurve{ CO2S=981.9117737, PARi=990.3832764, Tleaf=24.27973061, PhiPS2=0.250284039 },
|
|
new LeafInputDataCurve{ CO2S=1181.568982, PARi=990.2308533, Tleaf=24.49090347, PhiPS2=0.252074273 },
|
|
new LeafInputDataCurve{ CO2S=1379.865356, PARi=990.0950989, Tleaf=24.66598072, PhiPS2=0.25113703 },
|
|
new LeafInputDataCurve{ CO2S=1579.277905, PARi=989.9327454, Tleaf=24.77762184, PhiPS2=0.252735204 },
|
|
new LeafInputDataCurve{ CO2S=1977.797449, PARi=989.8097778, Tleaf=24.84818077, PhiPS2=0.248197252 },
|
|
};
|
|
|
|
public static LeafInputDataCurve GetLeafInputDataCurve =>
|
|
new LeafInputDataCurve
|
|
{
|
|
CO2S = 3.1,
|
|
PARi = 1.1,
|
|
};
|
|
|
|
public static LeafInputDataSite SampleLeafInputDataSite => new LeafInputDataSite
|
|
{
|
|
Latitude = 10,
|
|
Longitude = 20,
|
|
SiteId = "MySiteId",
|
|
SpeciesSampled = "Maple"
|
|
};
|
|
}
|
|
} |