public OneMlCmd(MlCmdKind cmdKind, string paramStr, MlOneUser mlOneUser) { paramStr = paramStr.Trim(); CmdKind = cmdKind; ParamStr = paramStr; MlOneUser = mlOneUser; }
public void Test(string cmdStr, MlCmdKind mlCmdKind, string paramStr) { var mail = new Mail(); mail.AppendLine(Encoding.ASCII.GetBytes("\r\n"));//区切り行(ヘッダ終了) mail.AppendLine(Encoding.ASCII.GetBytes(cmdStr));//区切り行(ヘッダ終了) var mlCmd = new MlCmd(null, mail, _user1); Assert.AreEqual(mlCmd.Cast<object>().Count(),1); // コマンド数は1 foreach (OneMlCmd oneMlCmd in mlCmd) { Assert.AreEqual(oneMlCmd.CmdKind,mlCmdKind); Assert.AreEqual(oneMlCmd.ParamStr,paramStr); break; } }
public void Test(string cmdStr, MlCmdKind mlCmdKind, string paramStr) { var mail = new Mail(); mail.AppendLine(Encoding.ASCII.GetBytes("\r\n")); //区切り行(ヘッダ終了) mail.AppendLine(Encoding.ASCII.GetBytes(cmdStr)); //区切り行(ヘッダ終了) var mlCmd = new MlCmd(null, mail, _user1); Assert.AreEqual(mlCmd.Cast <object>().Count(), 1); // コマンド数は1 foreach (OneMlCmd oneMlCmd in mlCmd) { Assert.AreEqual(oneMlCmd.CmdKind, mlCmdKind); Assert.AreEqual(oneMlCmd.ParamStr, paramStr); break; } }