public void TryGetBool_NumericValue_ReturnsFalse() { Dictionary <string, string> input = new Dictionary <string, string> { { Key1, LongAsString } }; CommandParameters parameters = new CommandParameters(input, string.Empty); Assert.IsFalse(parameters.TryGetBool(Key1, out bool boolValue)); }
public void TryGetBool_BoolValue_ReturnsTrue_SetsCorrectValue() { Dictionary <string, string> input = new Dictionary <string, string> { { Key1, BoolAsString } }; CommandParameters parameters = new CommandParameters(input, string.Empty); Assert.IsTrue(parameters.TryGetBool(Key1, out bool boolValue)); Assert.AreEqual(BoolAsBool, boolValue); }
public void TryGetBool_NoMatchingKey_ReturnsFalse() { CommandParameters parameters = new CommandParameters(EmptyInput, string.Empty); Assert.IsFalse(parameters.TryGetBool(Key1, out bool value)); }