01: /*
02: * Copyright 2007 Google Inc.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy of
06: * the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations under
14: * the License.
15: */
16: package com.google.gwt.junit.viewer.client;
17:
18: import com.google.gwt.user.client.rpc.IsSerializable;
19:
20: import java.util.Date;
21:
22: /**
23: * A data object summarizing the results of a report.
24: */
25: public class ReportSummary implements IsSerializable {
26:
27: private boolean allTestsSucceeded;
28:
29: private Date date;
30:
31: // A temporary addition until we get better date formatting in GWT user
32: private String dateString;
33:
34: private String id;
35:
36: // in GWT
37: private int numTests;
38:
39: public ReportSummary() {
40: }
41:
42: public ReportSummary(String id, Date date, String dateString,
43: int numTests, boolean allTestsSucceeded) {
44: this .id = id;
45: this .date = date;
46: this .dateString = dateString;
47: this .numTests = numTests;
48: this .allTestsSucceeded = allTestsSucceeded;
49: }
50:
51: public boolean allTestsSucceeded() {
52: return allTestsSucceeded;
53: }
54:
55: public Date getDate() {
56: return date;
57: }
58:
59: public String getDateString() {
60: return dateString;
61: }
62:
63: public String getId() {
64: return id;
65: }
66:
67: public int getNumTests() {
68: return numTests;
69: }
70: }
|