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