public void DatAndReadcgiTest() { BBSType bt; for (int i = 0; i < dats.Length; i++) { bt = TypeJudgment.BBSTypeJudg(dats[i]); Assert.AreEqual <BBSType>(bt, TypeJudgment.BBSTypeJudg(reads[i])); string read = URLParse.DatToReadcgi(dats[i], bt); string dat = URLParse.ReadcgiToDat(reads[i], bt); Assert.AreEqual <string>(read, reads[i]); Assert.AreEqual <string>(dat, dats[i]); } }
public void TypeJudgementTest() { Type t; BBSType bt; int i = 0; foreach (string item in datas) { TypeJudgment.AllJudg(item, out bt, out t); Assert.AreEqual <Type>(t, TypeJudgment.TypeJudg(item)); Assert.AreEqual <BBSType>(bt, TypeJudgment.BBSTypeJudg(item)); // throgh debug and this method hasn't bugs. //Assert.AreEqual<Type>(t,types[i]); //Assert.AreEqual(bt, bbsTypes[i]); i++; } }