public void TakeStatusSnapshotFailsIfProjectNameNotSet() { var client = new CruiseServerClient( new ServerStub("TakeStatusSnapshot", typeof(BuildRequest))); var exception = Assert.Throws<ArgumentNullException>(() => client.TakeStatusSnapshot(null)); Assert.AreEqual("projectName", exception.ParamName); }
public void TakeStatusSnapshot() { var response = new StatusSnapshotResponse(); response.Result = ResponseResult.Success; response.Snapshot = new ProjectStatusSnapshot(); var client = new CruiseServerClient( new ServerStub("TakeStatusSnapshot", typeof(ProjectRequest), "Project #1", response)); var result = client.TakeStatusSnapshot("Project #1"); Assert.AreSame(response.Snapshot, result); }