//-----------------------------------------------------------------------
//
// Copyright (c) 2009 Deltares. All rights reserved.
//
// B.S.T. The
// tom.the@deltares.nl
// 04-11-2009
// Test piping length calculation with wild data
//-----------------------------------------------------------------------
namespace Deltares.Dam.Tests
{
using System;
using System.IO;
using System.Linq;
using Deltares.Dam.Data;
using NUnit.Framework;
[TestFixture]
[Category("IntegrationTest")]
[Category("Slow")]
public class GageDikeRealWildDataTest
{
private const string InputWildDataFile = "TestData\\IJkdijk\\input_dam_wild.xml";
private const string OutputWildDataFile = "TestData\\IJkdijk\\output_dam_wild.xml";
private GageDikeProcessor processor;
private const int ExpectedNumberOfMonitoringPoints = 120;
private const int ExpectedNumberOfTransects = 15;
private const int ExpectedNumberOfSeries = ExpectedNumberOfMonitoringPoints * 2 + ExpectedNumberOfTransects * 2;
[TestFixtureSetUp]
public void TestSetup()
{
if (File.Exists(OutputWildDataFile))
File.Delete(OutputWildDataFile);
processor = new GageDikeProcessor();
processor.LoadWaterLevelTimeSerie(InputWildDataFile);
processor.Process();
processor.SaveResultsToFile(OutputWildDataFile);
}
[Test]
public void LoadedData()
{
Assert.AreEqual(ExpectedNumberOfMonitoringPoints, processor.OutputLocations.Count());
}
[Test]
public void ProcessedData()
{
Assert.AreEqual(ExpectedNumberOfSeries, processor.OutputTimeSeriesCollection.Series.Count);
}
[Test]
public void SavedData()
{
var writtenSerie = TimeSerieCollection.LoadFromFile(OutputWildDataFile);
Assert.AreEqual(ExpectedNumberOfSeries, writtenSerie.Series.Count);
}
[TestFixtureTearDown]
public void FixtureTearDown()
{
}
}
}