public void DenyTest(string str, LimitKind limitKind, string target, bool isAllow) { var allow = new Dat(new[] { CtrlType.TextBox, CtrlType.Int }); var deny = new Dat(new[] { CtrlType.TextBox, CtrlType.Int }); deny = AddDat(deny, limitKind, str); LimitUrl limitUrl = new LimitUrl(allow, deny); var errorStr = ""; Assert.AreEqual(limitUrl.IsAllow(target, ref errorStr), isAllow); }
Dat AddDat(Dat dat, LimitKind limitKind, string url) { dat.Add(true, string.Format("{0}\t{1}", url, (int)limitKind)); return(dat); }
Dat AddDat(Dat dat, LimitKind limitKind, string url) { dat.Add(true, string.Format("{0}\t{1}",url,(int)limitKind)); return dat; }
public PublicLimits(LimitKind kind, int limitValue) { Kind = kind; LimitValue = limitValue; }