public static void Boolean_ReturnsFalse_ForEmptyString_EmptyOrWhiteSpaceIsFalseStyle(string value) { var result = ParseTo.Boolean(value, BooleanStyles.EmptyOrWhiteSpaceIsFalse); Assert.True(result.HasValue); Assert.False(result.Value); }
public static void Boolean_ReturnsFalse_ForLiteralZero_ZeroOrOneStyle(string value) { var result = ParseTo.Boolean(value, BooleanStyles.ZeroOrOne); Assert.True(result.HasValue); Assert.False(result.Value); }
public static void Boolean_ReturnsTrue_ForLiteralTrue_LiteralStyle(string value) { var result = ParseTo.Boolean(value, BooleanStyles.Literal); Assert.True(result.HasValue); Assert.True(result.Value); }
public static void Boolean_ReturnsNull_ForInvalidInput_ZeroOrOneStyle(string value) { var result = ParseTo.Boolean(value, BooleanStyles.ZeroOrOne); Assert.False(result.HasValue); }
public static void Boolean_ReturnsNull_ForNullString() { var result = ParseTo.Boolean(null); Assert.False(result.HasValue); }