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

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

            notNull.String().Should().Be("val");
        }
Exemplo n.º 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");
        }