public void TestHashManyKnownTypeSuccess() { var parameter = new CommandParameter() { Data = { Content = new List<String>() { "1", "Anything", "Nothing" } } }; Assert.IsTrue(parameter.HasMany<String>(false)); }
public void TestHasManyEnumConversionFailed() { var parameter = new CommandParameter() { Data = { Content = new List<String>() { "Six", "Seven", "Invalid" } } }; Assert.IsFalse(parameter.HasMany<ExecutableEnum>()); }
public void TestHasManyGuidConversionFailed() { var parameter = new CommandParameter() { Data = { Content = new List<String>() { "9D2B0228-4D0D-4C23-8B49-01A698857709", "f380eb1e-1438-48c0-8c3d-ad55f2d40538", "Invalid" } } }; Assert.IsFalse(parameter.HasMany<Guid>()); }
public void TestHasManyDateTimeConversionFailed() { var parameter = new CommandParameter() { Data = { Content = new List<String>() { "2014-04-14 13:50:59", "2014-04-11 03:23:13", "Invalid" } } }; Assert.IsFalse(parameter.HasMany<DateTime>()); }
public void TestHasManyDateTimeConversionSuccess() { var parameter = new CommandParameter() { Data = { Content = new List<String>() { "2014-04-14 13:50:59", "2014-04-11 03:23:13" } } }; Assert.IsTrue(parameter.HasMany<DateTime>()); }
public void TestHasManyEnumConversionSuccess() { var parameter = new CommandParameter() { Data = { Content = new List<String>() { "Six", "Seven" } } }; Assert.IsTrue(parameter.HasMany<ExecutableEnum>()); }
public void TestHasManyIntegerConversionSuccess() { var parameter = new CommandParameter() { Data = { Content = new List<String>() { "1", "2" } } }; Assert.IsTrue(parameter.HasMany<int>()); }
public void TestHasManyIntegerConversionFailed() { var parameter = new CommandParameter() { Data = { Content = new List<String>() { "1", "2", "Invalid" } } }; Assert.IsFalse(parameter.HasMany<int>()); }