KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > junit > runner > FailedComparison


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  * David Saff (saff@mit.edu) - initial API and implementation
11  * (bug 102632: [JUnit] Support for JUnit 4.)
12  *******************************************************************************/

13
14 package org.eclipse.jdt.internal.junit.runner;
15
16 public class FailedComparison {
17
18     private final String JavaDoc fExpected;
19     private final String JavaDoc fActual;
20
21     public FailedComparison(String JavaDoc expected, String JavaDoc actual) {
22         fExpected = expected;
23         fActual = actual;
24     }
25
26     public String JavaDoc getActual() {
27         return fActual;
28     }
29
30     public String JavaDoc getExpected() {
31         return fExpected;
32     }
33
34     void sendMessages(MessageSender sender) {
35         sender.sendMessage(MessageIds.EXPECTED_START);
36         sender.sendMessage(getExpected());
37         sender.sendMessage(MessageIds.EXPECTED_END);
38     
39         sender.sendMessage(MessageIds.ACTUAL_START);
40         sender.sendMessage(getActual());
41         sender.sendMessage(MessageIds.ACTUAL_END);
42     }
43
44 }
45
Popular Tags