public void Size() { HasCollection hc = new HasCollection(); IClassValidator vtor = GetClassValidator(typeof(HasCollection)); hc.StringCollection = new List<string>(new string[] {"cuidado", "con", "el", "carancho!"}); Assert.AreEqual(0, vtor.GetInvalidValues(hc).Length); hc.StringCollection = new List<string>(new string[] { "pombero" }); Assert.AreEqual(1, vtor.GetInvalidValues(hc).Length); hc.StringCollection = new List<string>(new string[] { "Los","Pekes","Chicho","Nino","Nono","Fito" }); Assert.AreEqual(1, vtor.GetInvalidValues(hc).Length); }
public void Size() { HasCollection hc = new HasCollection(); IClassValidator vtor = GetClassValidator(typeof(HasCollection)); hc.StringCollection = new List<string>(new string[] {"cuidado", "con", "el", "carancho!"}); vtor.GetInvalidValues(hc).Should().Be.Empty(); hc.StringCollection = new List<string>(new string[] { "pombero" }); vtor.GetInvalidValues(hc).Should().Not.Be.Empty(); hc.StringCollection = new List<string>(new string[] { "Los","Pekes","Chicho","Nino","Nono","Fito" }); vtor.GetInvalidValues(hc).Should().Not.Be.Empty(); }
private void AcceptsHasCollection(HasCollection c) { }