// Copyright (C) Stichting Deltares 2017. All rights reserved.
//
// This file is part of Ringtoets.
//
// Ringtoets is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
//
// All names, logos, and references to "Deltares" are registered trademarks of
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
using System.Linq;
using Deltares.WTIStability;
using Deltares.WTIStability.Data.Geo;
using NUnit.Framework;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels.UpliftVan.Input
{
///
/// Class for asserting Uplift Van kernel input.
///
public static class UpliftVanKernelInputAssert
{
///
/// Asserts whether is equal to .
///
/// The expected .
/// The actual .
/// Thrown when
/// is not equal to .
public static void AssertSlipPlanesUpliftVan(SlipPlaneUpliftVan expected, SlipPlaneUpliftVan actual)
{
AssertSlipCircleGrid(expected.SlipPlaneLeftGrid, actual.SlipPlaneLeftGrid);
AssertSlipCircleGrid(expected.SlipPlaneRightGrid, actual.SlipPlaneRightGrid);
AssertSlipCircleTangentLine(expected.SlipCircleTangentLine, actual.SlipCircleTangentLine);
}
///
/// Asserts whether is equal to .
///
/// The expected .
/// The actual .
/// Thrown when
/// is not equal to .
private static void AssertSlipCircleGrid(SlipCircleGrid expected, SlipCircleGrid actual)
{
Assert.AreEqual(expected.GridXLeft, actual.GridXLeft);
Assert.AreEqual(expected.GridXRight, actual.GridXRight);
Assert.AreEqual(expected.GridZTop, actual.GridZTop);
Assert.AreEqual(expected.GridZBottom, actual.GridZBottom);
Assert.AreEqual(expected.GridXNumber, actual.GridXNumber);
Assert.AreEqual(expected.GridZNumber, actual.GridZNumber);
}
///
/// Asserts whether is equal to .
///
/// The expected .
/// The actual .
/// Thrown when
/// is not equal to .
private static void AssertSlipCircleTangentLine(SlipCircleTangentLine expected, SlipCircleTangentLine actual)
{
Assert.AreEqual(expected.AutomaticAtBoundaries, actual.AutomaticAtBoundaries);
Assert.AreEqual(expected.TangentLineZTop, actual.TangentLineZTop);
Assert.AreEqual(expected.TangentLineZBottom, actual.TangentLineZBottom);
Assert.AreEqual(expected.TangentLineNumber, actual.TangentLineNumber);
Assert.AreEqual(expected.MaxSpacingBetweenBoundaries, actual.MaxSpacingBetweenBoundaries);
}
}
}