예제 #1
0
        public void ValidateLevel_DoesNothingIfLevelIsBetween1And6Inclusive(int dummyLevel)
        {
            // Arrange
            FlexiSectionBlockFactory testSubject = CreateFlexiSectionBlockFactory();

            // Act and assert
            testSubject.ValidateLevel(dummyLevel); // Pass as long as this doesn't throw
        }
예제 #2
0
        public void ValidateLevel_ThrowsArgumentExceptionIfLevelIsLessThan1OrGreaterThan6(int dummyLevel)
        {
            // Arrange
            FlexiSectionBlockFactory testSubject = CreateFlexiSectionBlockFactory();

            // Act
            ArgumentOutOfRangeException result = Assert.Throws <ArgumentOutOfRangeException>(() => testSubject.ValidateLevel(dummyLevel));

            // Assert
            Assert.Equal($@"{string.Format(Strings.ArgumentOutOfRangeException_Shared_ValueMustBeWithinRange, "[1, 6]", dummyLevel)}
Parameter name: level",
                         result.Message, ignoreLineEndingDifferences: true);
        }