Ejemplo n.º 1
0
 /// <summary>
 /// Executes the specified cruise request.
 /// </summary>
 /// <param name="cruiseRequest">The cruise request.</param>
 /// <returns></returns>
 public IResponse Execute(ICruiseRequest cruiseRequest)
 {
     ProjectStatusListAndExceptions projectStatuses = farmService.GetProjectStatusListAndCaptureExceptions(cruiseRequest.ServerSpecifier,
         cruiseRequest.RetrieveSessionToken(sessionRetriever));
     ProjectStatus projectStatus = projectStatuses.GetStatusForProject(cruiseRequest.ProjectName);
     string xml = new CruiseXmlWriter().Write(projectStatus);
     return new XmlFragmentResponse(xml);
 }
 public void WriteSingleProject()
 {
     CruiseXmlWriter writer = new CruiseXmlWriter();
     ProjectStatus status = ProjectStatusFixture.New("test");
     string xml = writer.Write(status);
     XmlDocument document = XPathAssert.LoadAsDocument(xml);
     XPathAssert.Matches(document, "/CruiseControl/Projects/Project/@name", "test");
 }