Add details for search
This commit is contained in:
@@ -134,7 +134,7 @@ namespace LeafWeb.WebCms.Tests.Models
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CanConstructFromLeafInputFile()
|
||||
public void CanConstructAdminFromLeafInputFile()
|
||||
{
|
||||
var leafInput = GetLeafInput;
|
||||
var viewModel = new LeafInputDetails_Admin(leafInput);
|
||||
@@ -167,5 +167,35 @@ namespace LeafWeb.WebCms.Tests.Models
|
||||
//Assert.That(viewModel.LeafInputData[0].Id, Is.EqualTo(123));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CanConstructFromLeafInputFile()
|
||||
{
|
||||
var leafInput = GetLeafInput;
|
||||
var viewModel = new LeafInputDetails(leafInput);
|
||||
|
||||
//Assert.That(viewModel.CurrentStatus, Is.EqualTo(leafInput.CurrentStatus.ToString()));
|
||||
//Assert.That(viewModel., Is.EqualTo(leafInput.Id));
|
||||
//Assert.That(viewModel.LeafOutputFilenames, Has.Length.EqualTo(1));
|
||||
//Assert.That(viewModel., Is.EqualTo(leafInput.Identifier));
|
||||
Assert.That(viewModel.SiteId, Is.EqualTo(leafInput.SiteId));
|
||||
//Assert.That(viewModel.LeafInputPhotosynthesisType, Is.EqualTo(leafInput.PhotosynthesisType.Name));
|
||||
|
||||
Assert.That(viewModel.LeafInputData, Has.Count.EqualTo(1));
|
||||
Assert.That(viewModel.LeafInputData[0].SiteName, Is.EqualTo("MySite"));
|
||||
Assert.That(viewModel.LeafInputData[0].Id, Is.EqualTo(123));
|
||||
|
||||
Assert.That(viewModel.LeafInputData[0].Site, Is.Not.Null);
|
||||
Assert.That(viewModel.LeafInputData[0].Site.SiteId, Is.EqualTo("MySiteId"));
|
||||
Assert.That(viewModel.LeafInputData[0].Site.Latitude, Is.EqualTo(10));
|
||||
Assert.That(viewModel.LeafInputData[0].Site.Longitude, Is.EqualTo(20));
|
||||
Assert.That(viewModel.LeafInputData[0].Site.Elevation, Is.Null);
|
||||
|
||||
Assert.That(viewModel.LeafInputData[0].Data, Is.Not.Null);
|
||||
Assert.That(viewModel.LeafInputData[0].Data, Has.Count.GreaterThan(0));
|
||||
Assert.That(viewModel.LeafInputData[0].Data[0].CO2S, Is.EqualTo(3.1));
|
||||
|
||||
//Assert.That(viewModel.LeafInputData[0].Id, Is.EqualTo(123));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user