3334353637383940414243
@Test public void closeIfError( @Injectable final InputStreamReader reader, @Injectable final CSVParser parser) throws IOException { new Expectations() { { parser.getLine(); result = new String[] {"1"}; parser.getLine();
7576777879808182838485
} @Test public void normalCycle(@Injectable final InputStreamReader reader, @Injectable final CSVParser parser) throws IOException { new Expectations() { { parser.getLine(); result = new String[] {"1"}; parser.getLine();
2627282930313233343536
Main.main( args ); } @Test public void invokesReadAndWrite() throws Exception { new Expectations() { { new Read( "Fiddle-Faddle" ); Write write = new Write(); write.init( "Fiddle-Faddle" ); }
3637383940414243444546
} @Test public final void testSingleRecipient() throws Exception { new Expectations() { { backendServer.connect(); result = smartClient; smartClient.dataEnd();
5657585960616263646566
} @Test public final void testTwoRecipientsSingleDestination() throws Exception { new Expectations() { { backendServer.connect(); result = smartClient; smartClient.to(anyString);
2223242526272829303132
@NonStrict private Lookup lookup; @Test public void testQueryAddresses() throws SendException { new Expectations() { { lookup.run(); result = new Record[] { new ARecord(HOST1_EXAMPLE_COM_NAME, 0, 0, IP1),
4344454647484950515253
assertArrayEquals(expected, addresses); } @Test public void testQueryAddressesIpv6() throws SendException { new Expectations() { { lookup.run(); result = new Record[] { new AAAARecord(HOST6_EXAMPLE_COM_NAME, 0, 0, IPV6)
6364656667686970717273
assertArrayEquals(expected, addresses); } @Test public void testTransientDnsFailure() { new Expectations() { { lookup.run(); result = null; lookup.getResult();
private Lookup lookup; private MxLookup mxLookup = new MxLookup(EXAMPLE_COM_DOMAIN); @Test() public void testNoMxRecords() throws MxLookupException { new Expectations() { { lookup.run(); result = null; lookup.getResult();
5051525354555657585960
assertArrayEquals(new Name[] { EXAMPLE_COM_NAME }, targets); } @Test(expected = SendException.class) public void testHostNotFound() throws MxLookupException { new Expectations() { { lookup.run(); result = null; lookup.getResult();