Exemple #1
0
        public void IsNullOrEmptyConverter(object value, bool expectedResult)
        {
            var isNullOrEmptyConverter = new IsNullOrEmptyConverter();

            var result = isNullOrEmptyConverter.Convert(value, typeof(IsNotNullOrEmptyConverter_Tests), null, CultureInfo.CurrentCulture);

            Assert.AreEqual(result, expectedResult);
        }
Exemple #2
0
		/// <summary>
		/// Converts the incoming value to a <see cref="bool"/> indicating whether or not the value is not null and not empty.
		/// </summary>
		/// <param name="value">The value to convert.</param>
		/// <returns>A <see cref="bool"/> indicating if the incoming value is not null and not empty.</returns>
		public override bool ConvertFrom(object? value) => !IsNullOrEmptyConverter.ConvertInternal(value);