Index: Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingInputService.cs =================================================================== diff -u -rd515de49557312e4af41b1c051c900d39d1f9e2f -r8c1d631e78831a7fa357c4b285e89942d532bebb --- Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingInputService.cs (.../PipingInputService.cs) (revision d515de49557312e4af41b1c051c900d39d1f9e2f) +++ Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingInputService.cs (.../PipingInputService.cs) (revision 8c1d631e78831a7fa357c4b285e89942d532bebb) @@ -31,27 +31,23 @@ public static class PipingInputService { /// - /// Sets and that matching the input of a calculation if there is one matching + /// Sets and that match the input of a calculation if there is one matching /// or respectively. /// /// The input parameters to set the . /// The available stochastic soil models. public static void SetMatchingStochasticSoilModel(PipingInput pipingInput, IEnumerable availableStochasticSoilModels) { var available = availableStochasticSoilModels.ToList(); - if (available.Count == 0) + switch (available.Count) { - pipingInput.StochasticSoilModel = null; + case 0: + pipingInput.StochasticSoilModel = null; + break; + case 1: + pipingInput.StochasticSoilModel = available.First(); + break; } - else if (available.Count == 1) - { - if (pipingInput.StochasticSoilModel == available.First()) - { - return; - } - - pipingInput.StochasticSoilModel = available.First(); - } SyncStochasticSoilProfileWithStochasticSoilModel(pipingInput); }