public void PrepareStories_1ID_RepositoryShouldContainTheCorrectID() { const int Id1 = 230088; this.storyPreparer.PrepareStories(Id1.ToString(CultureInfo.InvariantCulture)); Story s = this.storyPreparer.GetStoryById(Id1); Assert.AreEqual(s.Id, Id1); }
public override string ToString() { StringBuilder __sb = new StringBuilder("EquivEdge("); __sb.Append(", Id1: "); __sb.Append(Id1 == null ? "<null>" : Id1.ToString()); __sb.Append(", Id2: "); __sb.Append(Id2 == null ? "<null>" : Id2.ToString()); __sb.Append(")"); return(__sb.ToString()); }
public void ProcessRequest(HttpContext context) { long Id; int Id1, Id2; string result = ""; decimal Score = 0; try { Id = Convert.ToInt64(DESEncrypt.Decrypt(context.Request.Params["id"].ToString())); Id1 = Convert.ToInt32(DESEncrypt.Decrypt(context.Request.Params["id1"].ToString())); Id2 = Convert.ToInt32(DESEncrypt.Decrypt(context.Request.Params["id2"].ToString())); Score = Convert.ToDecimal(context.Request.Params["txtScore"].ToString()); var model = new Model.CCOM.Examination_subject_score(); var _model = new Model.CCOM.Examination_subject_score(); BLL.CCOM.Examination_subject_score Bess = new BLL.CCOM.Examination_subject_score(); model = new BLL.CCOM.Examination_subject_score().GetModel(" Esn_id = " + Id1 + " AND User_id=" + Id + " AND Judge_id=" + Id2); _model.Esn_id = Id1; _model.Ess_score = Score; _model.Judge_id = Id2; _model.User_id = Id; _model.Ess_score_status = true; _model.Ess_order_status = true; if (model != null) { _model.Ess_id = model.Ess_id; Bess.Update(_model); } else { Bess.Add(_model); } new Calculation().calculateSubjectXu(Id1.ToString(), Id2.ToString()); result += "添加成功"; } catch (Exception ex) { ILog LOGGER = LogManager.GetLogger("quanquan"); LOGGER.Debug(ex.Message, ex); result += "添加失败,请重新尝试"; } context.Response.ContentType = "text/plain"; context.Response.Write(result); }
public void anyof_index_should_has_entities() { Assert.AreEqual(2, IndexAny.GetEntities(Key).Count); Assert.AreEqual(1, IndexAny.GetEntities(Key2).Count); Assert.AreEqual(1, IndexAny.GetEntities(Id1.ToString()).Count); }