public void isValid() { NotEmptyValidator val = new NotEmptyValidator(); ictl = rep.Stub <iControl>(); Expect.On(ictl).Call(ictl.getValue()).Return(String.Empty); rep.ReplayAll(); Assert.IsFalse(val.isValid(ictl)); }
public void isValidWithValue() { NotEmptyValidator val = new NotEmptyValidator(); Expect.On(ictl).Call(ictl.getValue()).Return( "pepe" ); rep.ReplayAll(); Assert.IsTrue(val.isValid(ictl)); }
public void isValidWithNull() { NotEmptyValidator val = new NotEmptyValidator(); val.isValid(null); }