public void GetHashCodeReturnsAValidHasCode() { IntegrationRequest request = new IntegrationRequest(BuildCondition.ForceBuild, "Me", null); int expected = request.ToString().GetHashCode(); int actual = request.GetHashCode(); Assert.AreEqual(expected, actual); }
private void WriteRequest(IntegrationRequest request) { if (request == null) return; writer.WriteStartElement(Elements.Request); writer.WriteAttributeString("source", request.Source); writer.WriteAttributeString("buildCondition", request.BuildCondition.ToString()); writer.WriteString(request.ToString()); writer.WriteEndElement(); // Output the parameters if ((request.BuildValues != null) && (request.BuildValues.Count > 0)) { writer.WriteStartElement(Elements.Parameters); foreach (string key in request.BuildValues.Keys) { writer.WriteStartElement(Elements.Parameter); writer.WriteAttributeString("name", key); writer.WriteAttributeString("value", request.BuildValues[key]); writer.WriteEndElement(); } writer.WriteEndElement(); } }
/// <summary> /// Initialises the target for a build. /// </summary> /// <param name="request">The request.</param> public void InitialiseForBuild(IntegrationRequest request) { this.ClearMessages(Message.MessageKind.BuildStatus); this.AddMessage(new Message(request.ToString(), Message.MessageKind.BuildStatus)); }