Beispiel #1
0
        public void ShouldThrowExceptionForNullText()
        {
            Text   notNull = new NotNull(null);
            Action action  = () => notNull.String();

            action.ShouldThrowExactly <Exception>().WithMessage("NULL instead of a valid text");
        }
Beispiel #2
0
        public void ShouldReturnInputAsString()
        {
            Text text    = new TextOf("val");
            Text notNull = new NotNull(text);

            notNull.String().Should().Be("val");
        }
Beispiel #3
0
        public void ShouldThrowExceptionForNullTextValue()
        {
            Text   text    = new TextOf((string)null);
            Text   notNull = new NotNull(text);
            Action action  = () => notNull.String();

            action.ShouldThrowExactly <Exception>().WithMessage("NULL instead of a valid result string");
        }