コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: CollectionFixture.cs プロジェクト: spib/nhcontrib
        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();
        }
コード例 #3
0
 private void AcceptsHasCollection(HasCollection c)
 {
 }
コード例 #4
0
 private void AcceptsHasCollection(HasCollection c)
 {
 }