1 15 package hivemind.test.services.impl; 16 17 import java.util.List; 18 import java.util.Map; 19 20 import org.apache.commons.logging.Log; 21 import org.apache.hivemind.Messages; 22 23 import junit.framework.Assert; 24 import junit.framework.AssertionFailedError; 25 26 import hivemind.test.services.ConstructorAccess; 27 28 32 public class ConstructorAccessImpl implements ConstructorAccess 33 { 34 35 private String actualMessage; 36 37 private String expectedMessage; 38 39 public ConstructorAccessImpl() 40 { 41 actualMessage = "()"; 42 } 43 44 public ConstructorAccessImpl(long l) 45 { 46 actualMessage = "(long)"; 47 } 48 49 public ConstructorAccessImpl(String string) 50 { 51 actualMessage = "(String)"; 52 } 53 54 public ConstructorAccessImpl(ConstructorAccess service) 55 { 56 actualMessage = "(ConstructorAccess)"; 57 } 58 59 public ConstructorAccessImpl(ConstructorAccess service, String s) 60 { 61 actualMessage = "(ConstructorAccess, String)"; 62 } 63 64 public ConstructorAccessImpl(List configurations) 65 { 66 actualMessage = "(List)"; 67 } 68 69 public ConstructorAccessImpl(Map configurations, long l) 70 { 71 actualMessage = "(Map, long)"; 72 } 73 74 public ConstructorAccessImpl(Log log, Messages messages) 75 { 76 actualMessage = "(Log, Messages)"; 77 } 78 79 public ConstructorAccessImpl(long l, ConstructorAccess nullObject) 80 { 81 actualMessage = "(long, " + nullObject + ")"; 82 } 83 84 public void setExpectedConstructorMessage(String expectedMessage) 85 { 86 this.expectedMessage = expectedMessage; 87 } 88 89 public void verify() throws AssertionFailedError 90 { 91 Assert.assertEquals(expectedMessage, actualMessage); 92 } 93 94 } | Popular Tags |