Example #1
0
            public void ShouldThrowArgumentExceptionWhen_param_IsEmpty()
            {
                // Given
                var param = new List<int>();

                // When
                Action action = () => param.MustNotBeNullOrEmpty("fakeParamName");

                // Then
                action
                    .ShouldThrow<ArgumentException>()
                    .WithMessage("Value cannot be empty.\r\nParameter name: fakeParamName");
            }
Example #2
0
            public void ShouldReturn_param_When_param_IsNotNull()
            {
                // Given
                var param = new List<int>(new[] { 1, 2 });

                // When
                var value = param.MustNotBeNullOrEmpty("fakeParamName");

                // Then
                value.Should().BeEquivalentTo(param);
            }