//-----------------------------------------------------------------------
//
// Copyright (c) 2011 Deltares. All rights reserved.
//
// B.S.T.I.M. The
// tom.the@deltares.nl
// 16-2-2011
// n.a.
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using Deltares.Dam.TestHelper;
using Deltares.Standard.Extensions;
namespace Deltares.Dam.Tests
{
using Deltares.Dam.Data;
using NUnit.Framework;
[TestFixture]
public class DikeJobTest
{
private IList disposables;
[SetUp]
public void SetUp()
{
disposables = new List();
}
[TearDown]
public void TearDown()
{
foreach (var disposable in disposables)
{
disposable.Dispose();
}
disposables = null;
}
[Test]
public void IsMissingWaterLevelSerieDetected()
{
WaterBoardJob waterBoardJob = FactoryForWaterBoard.CreateWaterBoardJobWithOneLocationWithoutWaterLevelTimeSeries();
disposables.AddRange(FactoryForWaterBoard.GetDisposableObjectsFromWaterBoardJob(waterBoardJob));
foreach (DamJob damJob in waterBoardJob.Jobs)
{
if (damJob.GetType() == typeof(DikeJob))
{
Assert.IsFalse(((DikeJob)damJob).AreAllLocationWaterLevelTimeSeriesAssigned(), "Check if all waterlevels not assigned");
}
}
}
}
}