Пример #1
0
        public void validator_requires_place_resource()
        {
            var l = new Web.Resources.List();
            var sut = new NewPlaceValidator();

            Assert.Throws<ArgumentException>(() => sut.Validate(l));
        }
Пример #2
0
        public void name_required()
        {
            var p = new Web.Resources.Place();
            var sut = new NewPlaceValidator();

            var errorList = sut.Validate(p);
            Assert.IsTrue(errorList.Any(x => x.Field == "Name"));
            Assert.AreEqual(1, errorList.Count);
        }