/// <summary>
        /// Creates a new instance of <see cref="IllustrationPointControlItem"/>.
        /// </summary>
        /// <param name="source">The wrapped source <see cref="TopLevelIllustrationPointBase"/>.</param>
        /// <param name="windDirectionName">The name of the wind direction.</param>
        /// <param name="closingSituation">The closing situation of the illustration
        ///     point.</param>
        /// <param name="stochasts">The associated stochasts.</param>
        /// <param name="beta">The beta of the illustration point.</param>
        /// <exception cref="ArgumentNullException">Thrown when parameter
        /// <paramref name="source"/>, <paramref name="windDirectionName"/>,
        /// <paramref name="closingSituation"/> or <paramref name="stochasts"/> is
        /// <c>null</c>.</exception>
        public IllustrationPointControlItem(TopLevelIllustrationPointBase source,
                                            string windDirectionName,
                                            string closingSituation,
                                            IEnumerable <Stochast> stochasts,
                                            RoundedDouble beta)
        {
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }

            if (windDirectionName == null)
            {
                throw new ArgumentNullException(nameof(windDirectionName));
            }

            if (closingSituation == null)
            {
                throw new ArgumentNullException(nameof(closingSituation));
            }

            if (stochasts == null)
            {
                throw new ArgumentNullException(nameof(stochasts));
            }

            Source            = source;
            WindDirectionName = windDirectionName;
            ClosingSituation  = closingSituation;
            Beta      = beta;
            Stochasts = stochasts;
        }
Exemple #2
0
 /// <summary>
 /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
 /// are clones.
 /// </summary>
 /// <param name="original">The original object.</param>
 /// <param name="clone">The cloned object.</param>
 /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
 /// <paramref name="clone"/> are not clones.</exception>
 public static void AreClones(TopLevelIllustrationPointBase original, TopLevelIllustrationPointBase clone)
 {
     CoreCloneAssert.AreObjectClones(original.WindDirection, clone.WindDirection, AreClones);
     Assert.AreEqual(original.ClosingSituation, clone.ClosingSituation);
 }