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