/// <summary>
 /// Constructor for failure message and restriction
 /// </summary>
 /// <param name="failureMessage"></param>
 /// <param name="restriction"></param>
 public SmoothFailureAndReasonForFailure(
     SmoothFailureMessages failureMessage,
     Restriction restriction)
     : this(failureMessage)
 {
     Restriction = restriction;
 }
 private static void AssertFailureMessage(
     SmoothFailureMessagesForSpotsCollection res,
     SmoothFailureMessages message)
 {
     _ = res.Should().ContainSingle();
     _ = res.First().Value.Failures.Should().ContainSingle();
     _ = res.First().Value.Failures[0].FailureMessage.Should().Be(message);
 }
        public void SingleItemInSingleItemOutNoRestriction()
        {
            // Arrange
            var target  = new SmoothFailureMessagesForSpotsCollection();
            var spotUid = Guid.NewGuid();
            const SmoothFailureMessages specimen = SmoothFailureMessages.T1_BreakPosition;

            // Act
            target.Add(spotUid, specimen);

            // Assert
            _ = target.Should().ContainSingle(becauseArgs: null);
            _ = target[spotUid].Failures[0].FailureMessage.Should().Be(specimen, becauseArgs: null);
        }
        public void SingleItemInSingleItemOutIncludingRestrictionInitialisedCollection()
        {
            // Arrange
            var target      = new SmoothFailureMessagesForSpotsCollection();
            var spotUid     = Guid.NewGuid();
            var restriction = new Mock <Restriction>().Object;

            const SmoothFailureMessages specimen = SmoothFailureMessages.T1_BreakPosition;

            // Act
            target.InitialiseForSpot(spotUid);
            target.Add(spotUid, specimen, restriction);

            // Assert
            _ = target.Should().ContainSingle(becauseArgs: null);
            _ = target[spotUid].Failures[0].FailureMessage.Should().Be(specimen, becauseArgs: null);
        }
 /// <summary>
 /// Constructor for failure message only
 /// </summary>
 /// <param name="failureMessage"></param>
 public SmoothFailureAndReasonForFailure(SmoothFailureMessages failureMessage)
 {
     FailureMessage = failureMessage;
 }