public T Get <T>(StepKey key)
        {
            if (_dict.ContainsKey(key))
            {
                return((T)_dict[key]);
            }

            throw new ArgumentException("Error: Could not ", key.ToString());
        }
Example #2
0
        public Dictionary <string, object> ToDic()
        {
            var dic = new Dictionary <string, object>();

            dic.SetValue("StepKey", StepKey.ToString());
            dic.SetValue("StepName", StepName.ToString());
            dic.SetValue("UserID", UserID);
            dic.SetValue("UserName", UserName);
            dic.SetValue("Options", String.Join <AuditOption>(",", this.Options));
            dic.SetValue("StepIndex", StepIndex);
            dic.SetValue("AuditModel", AuditModel.ToString());
            dic.SetValue("AuditRole", AuditRole.ToString());
            dic.SetValue("MustStep", MustStep);
            dic.SetValue("CoSign", CoSign);
            dic.SetValue("CoSignRole", CoSignRole);
            return(dic);
        }
 public void Set(StepKey key, object value)
 {
     _dict[key] = value;
 }
        public void TheStatusCodeIs(HttpStatusCode status, StepKey key)
        {
            var result = _context.Get <HttpResponseMessage>(key);

            Assert.That(result.StatusCode, Is.EqualTo(status));
        }