target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testTrailerValues() throws Exception { final String[] expectedValuesSet1 = { "one", "two", "three" }; final String[] expectedValuesSet2 = { "one" }; final String[] emptySet = {}; Iterable<String> result = mimeHeaders.trailerValues("custom-before"); List<String> list = new ArrayList<>(); for (String s ...
public Iterable<String> trailerValues(final String name) { return new Iterable<String>() { @Override public Iterator<String> iterator() { return new ValuesIterator(MimeHeaders.this, name, true); } }; }
MimeHeaders { public Iterable<String> trailerValues(final String name) { return new Iterable<String>() { @Override public Iterator<String> iterator() { return new ValuesIterator(MimeHeaders.this, name, true); } }; } }
MimeHeaders { public Iterable<String> trailerValues(final String name) { return new Iterable<String>() { @Override public Iterator<String> iterator() { return new ValuesIterator(MimeHeaders.this, name, true); } }; } MimeHeaders(); }
MimeHeaders { public Iterable<String> trailerValues(final String name) { return new Iterable<String>() { @Override public Iterator<String> iterator() { return new ValuesIterator(MimeHeaders.this, name, true); } }; } MimeHeaders(); void mark(); void recycle(); void clear(); @Override String toString(); void copyFrom(fin...
MimeHeaders { public Iterable<String> trailerValues(final String name) { return new Iterable<String>() { @Override public Iterator<String> iterator() { return new ValuesIterator(MimeHeaders.this, name, true); } }; } MimeHeaders(); void mark(); void recycle(); void clear(); @Override String toString(); void copyFrom(fin...
@Test public void testBasicFormats() { final Response response = mockSimpleResponse(); Locale.setDefault(Locale.US); assertEquals("remote-host - remote-user [2014/Jan/15:23:45:12 +0000] \"GET /test/path?testing=true HTTP/1.1\" 210 1234567", ApacheLogFormat.COMMON_UTC.unsafeFormat(response, date, nanos)); assertEquals("...
String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } return builder.toString(); }
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
@Test public void testBasicFormatsEmptyResponse() { final Response response = mockEmptyResponse(); assertEquals(ApacheLogFormat.COMMON_UTC .unsafeFormat(response, date, nanos), "- - - [2014/Jan/15:23:45:12 +0000] \"- - -\" 000 -"); assertEquals(ApacheLogFormat.COMBINED_UTC .unsafeFormat(response, date, nanos), "- - - [...
String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } return builder.toString(); }
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
@Test public void testEscapes() { final Response response = mockSimpleResponse(); assertEquals(new ApacheLogFormat("%%\\t\\b\\n\\r\\f\\%").unsafeFormat(response, date, nanos), "%\t\b\n\r\f%"); }
String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } return builder.toString(); }
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
@Test public void testPatterns() { final Response response = mockSimpleResponse(); assertEquals(new ApacheLogFormat("%a").unsafeFormat(response, date, nanos), CLIENT_IP); assertEquals(new ApacheLogFormat("%A").unsafeFormat(response, date, nanos), SERVER_IP); assertEquals(new ApacheLogFormat("%b").unsafeFormat(response,...
String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } return builder.toString(); }
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
@Test public void testPatternsEmptyResponse() { final Response response = mockEmptyResponse(); assertEquals("remote-ip", "-", new ApacheLogFormat("%a").unsafeFormat(response, date, -1)); assertEquals("local-ip", "-", new ApacheLogFormat("%A").unsafeFormat(response, date, -1)); assertEquals("response bytes", "-", new Ap...
String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } return builder.toString(); }
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
@Test public void testDates() { final TimeZone utc = TimeZone.getTimeZone("UTC"); final TimeZone jst = TimeZone.getTimeZone("JST"); final Response response = mockEmptyResponse(); assertEquals(new ApacheLogFormat(utc, "%t") .unsafeFormat(response, date, nanos), "[2014/Jan/15:23:45:12 +0000]"); assertEquals(new ApacheLog...
String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } return builder.toString(); }
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
ApacheLogFormat implements AccessLogFormat { String unsafeFormat(Response response, Date timeStamp, long responseNanos) { final StringBuilder builder = new StringBuilder(); final Request request = response.getRequest(); for (Field field: fields) { field.format(builder, request, response, timeStamp, responseNanos); } re...
@Test public void testToByteBufferArray() { final byte[] bytes = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; final List<Buffer> bufferList = new ArrayList<Buffer>(); for (byte b : bytes) { final Buffer buffer = mm.allocate(1); buffer.put(0, b); bufferList.add(buffer); } final Buffer[] buffers = bufferList.toArray(new Buf...
public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } static CompositeBuffer newBuffer(); static CompositeBuffer newBuffer(final MemoryManager memoryManager); static CompositeBuffer newBuffer(final MemoryManager memoryManager, final Buffer... buffe...
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } static CompositeBuffer newBuffer(); static CompositeBuffer newBuffer(final MemoryManager memoryManager); static CompositeBuffer newBuffer(final MemoryManager memoryManager, final Buffer... buffe...
@Test public void testGetFormat() { assertFormat("%a"); assertFormat("%A"); assertFormat("%b"); assertFormat("%B"); assertFormat("%{Test-Cookie}C", "%{test-cookie}C"); assertFormat("%D"); assertFormat("%h"); assertFormat("%{remote}h", "%h"); assertFormat("%{local}h"); assertFormat("%H"); assertFormat("%{User-Agent}i", ...
public String getFormat() { final StringBuilder builder = new StringBuilder(); for (Field field: fields) builder.append(field.toString()); return builder.toString(); }
ApacheLogFormat implements AccessLogFormat { public String getFormat() { final StringBuilder builder = new StringBuilder(); for (Field field: fields) builder.append(field.toString()); return builder.toString(); } }
ApacheLogFormat implements AccessLogFormat { public String getFormat() { final StringBuilder builder = new StringBuilder(); for (Field field: fields) builder.append(field.toString()); return builder.toString(); } ApacheLogFormat(String format); ApacheLogFormat(TimeZone timeZone, String format); }
ApacheLogFormat implements AccessLogFormat { public String getFormat() { final StringBuilder builder = new StringBuilder(); for (Field field: fields) builder.append(field.toString()); return builder.toString(); } ApacheLogFormat(String format); ApacheLogFormat(TimeZone timeZone, String format); @Override String format...
ApacheLogFormat implements AccessLogFormat { public String getFormat() { final StringBuilder builder = new StringBuilder(); for (Field field: fields) builder.append(field.toString()); return builder.toString(); } ApacheLogFormat(String format); ApacheLogFormat(TimeZone timeZone, String format); @Override String format...
@Test public void testAcceptEncodingProcessing() throws Exception { final CompressionEncodingFilter filter = new CompressionEncodingFilter(CompressionMode.ON, 1, new String[0], new String[0], new String[] {"gzip"}); HttpRequestPacket request = setAcceptEncoding( HttpRequestPacket.builder().method(Method.GET).protocol(P...
@Override public boolean applyEncoding(final HttpHeader httpPacket) { if (httpPacket.isRequest()) { assert httpPacket instanceof HttpRequestPacket; return false; } assert httpPacket instanceof HttpResponsePacket; return canCompressHttpResponse((HttpResponsePacket) httpPacket, compressionConfig, aliases); }
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyEncoding(final HttpHeader httpPacket) { if (httpPacket.isRequest()) { assert httpPacket instanceof HttpRequestPacket; return false; } assert httpPacket instanceof HttpResponsePacket; return canCompressHttpResponse((HttpResponsePacket) h...
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyEncoding(final HttpHeader httpPacket) { if (httpPacket.isRequest()) { assert httpPacket instanceof HttpRequestPacket; return false; } assert httpPacket instanceof HttpResponsePacket; return canCompressHttpResponse((HttpResponsePacket) h...
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyEncoding(final HttpHeader httpPacket) { if (httpPacket.isRequest()) { assert httpPacket instanceof HttpRequestPacket; return false; } assert httpPacket instanceof HttpResponsePacket; return canCompressHttpResponse((HttpResponsePacket) h...
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyEncoding(final HttpHeader httpPacket) { if (httpPacket.isRequest()) { assert httpPacket instanceof HttpRequestPacket; return false; } assert httpPacket instanceof HttpResponsePacket; return canCompressHttpResponse((HttpResponsePacket) h...
@Test public void testMinSizeSetting() throws Exception { final CompressionEncodingFilter filter = new CompressionEncodingFilter(CompressionMode.ON, 1024, new String[0], new String[0], new String[] {"gzip"}); HttpRequestPacket request = setAcceptEncoding( HttpRequestPacket.builder().method(Method.GET).protocol(Protocol...
@Override public boolean applyEncoding(final HttpHeader httpPacket) { if (httpPacket.isRequest()) { assert httpPacket instanceof HttpRequestPacket; return false; } assert httpPacket instanceof HttpResponsePacket; return canCompressHttpResponse((HttpResponsePacket) httpPacket, compressionConfig, aliases); }
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyEncoding(final HttpHeader httpPacket) { if (httpPacket.isRequest()) { assert httpPacket instanceof HttpRequestPacket; return false; } assert httpPacket instanceof HttpResponsePacket; return canCompressHttpResponse((HttpResponsePacket) h...
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyEncoding(final HttpHeader httpPacket) { if (httpPacket.isRequest()) { assert httpPacket instanceof HttpRequestPacket; return false; } assert httpPacket instanceof HttpResponsePacket; return canCompressHttpResponse((HttpResponsePacket) h...
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyEncoding(final HttpHeader httpPacket) { if (httpPacket.isRequest()) { assert httpPacket instanceof HttpRequestPacket; return false; } assert httpPacket instanceof HttpResponsePacket; return canCompressHttpResponse((HttpResponsePacket) h...
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyEncoding(final HttpHeader httpPacket) { if (httpPacket.isRequest()) { assert httpPacket instanceof HttpRequestPacket; return false; } assert httpPacket instanceof HttpResponsePacket; return canCompressHttpResponse((HttpResponsePacket) h...
@Test public void testContentEncodingProcessing() throws Exception { final CompressionEncodingFilter filter = new CompressionEncodingFilter(CompressionMode.ON, 1, new String[0], new String[0], new String[] {"gzip"}, true); HttpRequestPacket request = setContentEncoding( HttpRequestPacket.builder().method(Method.GET).pr...
@Override public boolean applyDecoding(final HttpHeader httpPacket) { if(! httpPacket.isRequest()) { return false; } assert httpPacket instanceof HttpRequestPacket; return canDecompressHttpRequest((HttpRequestPacket) httpPacket, compressionConfig, aliases); }
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyDecoding(final HttpHeader httpPacket) { if(! httpPacket.isRequest()) { return false; } assert httpPacket instanceof HttpRequestPacket; return canDecompressHttpRequest((HttpRequestPacket) httpPacket, compressionConfig, aliases); } }
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyDecoding(final HttpHeader httpPacket) { if(! httpPacket.isRequest()) { return false; } assert httpPacket instanceof HttpRequestPacket; return canDecompressHttpRequest((HttpRequestPacket) httpPacket, compressionConfig, aliases); } Compre...
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyDecoding(final HttpHeader httpPacket) { if(! httpPacket.isRequest()) { return false; } assert httpPacket instanceof HttpRequestPacket; return canDecompressHttpRequest((HttpRequestPacket) httpPacket, compressionConfig, aliases); } Compre...
CompressionEncodingFilter implements EncodingFilter { @Override public boolean applyDecoding(final HttpHeader httpPacket) { if(! httpPacket.isRequest()) { return false; } assert httpPacket instanceof HttpRequestPacket; return canDecompressHttpRequest((HttpRequestPacket) httpPacket, compressionConfig, aliases); } Compre...
@Test public void testToByteBuffer() { final byte[] bytes = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; final List<Buffer> bufferList = new ArrayList<Buffer>(); for (byte b : bytes) { final Buffer buffer = mm.allocate(1); buffer.put(0, b); bufferList.add(buffer); } final Buffer[] buffers = bufferList.toArray(new Buffer[b...
public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } static CompositeBuffer newBuffer(); static CompositeBuffer newBuffer(final MemoryManager memoryManager); static CompositeBuffer newBuffer(final MemoryManager memoryManager, final Buffer... buffe...
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } static CompositeBuffer newBuffer(); static CompositeBuffer newBuffer(final MemoryManager memoryManager); static CompositeBuffer newBuffer(final MemoryManager memoryManager, final Buffer... buffe...
@Test public void testToStringContent2() { final Charset utf16 = Charset.forName("UTF-16"); final String msg = "\u043F\u0440\u0438\u0432\u0435\u0442"; final Buffer msgBuffer = Buffers.wrap(mm, msg, utf16); final Buffer b1 = msgBuffer.duplicate(); final Buffer b2 = b1.split(3); final CompositeBuffer composite = Composit...
public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } static CompositeBuffer newBuffer(); static CompositeBuffer newBuffer(final MemoryManager memoryManager); static CompositeBuffer newBuffer(final MemoryManager memoryManager, final Buffer... buffe...
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } static CompositeBuffer newBuffer(); static CompositeBuffer newBuffer(final MemoryManager memoryManager); static CompositeBuffer newBuffer(final MemoryManager memoryManager, final Buffer... buffe...
@Test public void testGetByteBuffer() { final byte[] bytes = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; final List<Buffer> bufferList = new ArrayList<Buffer>(); for (byte b : bytes) { final Buffer buffer = mm.allocate(1); buffer.put(0, b); bufferList.add(buffer); } final Buffer[] buffers = bufferList.toArray(new Buffer[...
public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } }
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } static CompositeBuffer newBuffer(); static CompositeBuffer newBuffer(final MemoryManager memoryManager); static CompositeBuffer newBuffer(final MemoryManager memoryManager, final Buffer... buffe...
CompositeBuffer implements Buffer { public static CompositeBuffer newBuffer() { return BuffersBuffer.create(); } static CompositeBuffer newBuffer(); static CompositeBuffer newBuffer(final MemoryManager memoryManager); static CompositeBuffer newBuffer(final MemoryManager memoryManager, final Buffer... buffe...
@Test public void testBulk() { final Charset ascii = Charset.forName("ASCII"); final CompositeBuffer composite = CompositeBuffer.newBuffer( mm, Buffers.wrap(mm, "hello", ascii), Buffers.wrap(mm, " world", ascii)); composite.bulk(new CompositeBuffer.BulkOperation() { @Override public boolean processByte(byte value, fina...
public abstract int bulk(BulkOperation operation);
CompositeBuffer implements Buffer { public abstract int bulk(BulkOperation operation); }
CompositeBuffer implements Buffer { public abstract int bulk(BulkOperation operation); }
CompositeBuffer implements Buffer { public abstract int bulk(BulkOperation operation); static CompositeBuffer newBuffer(); static CompositeBuffer newBuffer(final MemoryManager memoryManager); static CompositeBuffer newBuffer(final MemoryManager memoryManager, final Buffer... buffers); static CompositeBuffe...
CompositeBuffer implements Buffer { public abstract int bulk(BulkOperation operation); static CompositeBuffer newBuffer(); static CompositeBuffer newBuffer(final MemoryManager memoryManager); static CompositeBuffer newBuffer(final MemoryManager memoryManager, final Buffer... buffers); static CompositeBuffe...
@Test public void testDefaultPoolInitialization() throws Exception { final int numProcessors = Runtime.getRuntime().availableProcessors(); final long maxMemory = Runtime.getRuntime().maxMemory(); final long totalMemory = (long) (maxMemory * DEFAULT_HEAP_USAGE_PERCENTAGE); final long upperBound = (long) (maxMemory * .10...
Pool[] getPools() { return Arrays.copyOf(pools, pools.length); }
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { Pool[] getPools() { return Arrays.copyOf(pools, pools.length); } }
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { Pool[] getPools() { return Arrays.copyOf(pools, pools.length); } PooledMemoryManager(); @SuppressWarnings("unused") PooledMemoryManager(final boolean isDirect); PooledMemoryManager( final int baseBufferSize, final int numberO...
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { Pool[] getPools() { return Arrays.copyOf(pools, pools.length); } PooledMemoryManager(); @SuppressWarnings("unused") PooledMemoryManager(final boolean isDirect); PooledMemoryManager( final int baseBufferSize, final int numberO...
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { Pool[] getPools() { return Arrays.copyOf(pools, pools.length); } PooledMemoryManager(); @SuppressWarnings("unused") PooledMemoryManager(final boolean isDirect); PooledMemoryManager( final int baseBufferSize, final int numberO...
@Test public void testCustomizedPoolInitialization() throws Exception { final float memoryPercentage = 0.05f; final int processors = Runtime.getRuntime().availableProcessors(); final long maxMemory = Runtime.getRuntime().maxMemory(); PooledMemoryManager mm = new PooledMemoryManager(2048, 1, 0, processors, memoryPercent...
Pool[] getPools() { return Arrays.copyOf(pools, pools.length); }
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { Pool[] getPools() { return Arrays.copyOf(pools, pools.length); } }
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { Pool[] getPools() { return Arrays.copyOf(pools, pools.length); } PooledMemoryManager(); @SuppressWarnings("unused") PooledMemoryManager(final boolean isDirect); PooledMemoryManager( final int baseBufferSize, final int numberO...
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { Pool[] getPools() { return Arrays.copyOf(pools, pools.length); } PooledMemoryManager(); @SuppressWarnings("unused") PooledMemoryManager(final boolean isDirect); PooledMemoryManager( final int baseBufferSize, final int numberO...
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { Pool[] getPools() { return Arrays.copyOf(pools, pools.length); } PooledMemoryManager(); @SuppressWarnings("unused") PooledMemoryManager(final boolean isDirect); PooledMemoryManager( final int baseBufferSize, final int numberO...
@Test public void testReallocate() throws Exception { PooledMemoryManager mm = new PooledMemoryManager(DEFAULT_BASE_BUFFER_SIZE, 1, 0, 1, DEFAULT_HEAP_USAGE_PERCENTAGE, DEFAULT_PREALLOCATED_BUFFERS_PERCENTAGE, isDirect); Buffer b = mm.allocate(2048); Buffer nb = mm.reallocate(b, 1024); assertEquals(1024, nb.limit()); a...
@Override public Buffer reallocate(final Buffer oldBuffer, final int newSize) { if (newSize == 0) { oldBuffer.tryDispose(); return Buffers.EMPTY_BUFFER; } final int curBufSize = oldBuffer.capacity(); if (oldBuffer instanceof PoolBuffer) { if (curBufSize >= newSize) { final PoolBuffer oldPoolBuffer = (PoolBuffer) oldBuf...
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { @Override public Buffer reallocate(final Buffer oldBuffer, final int newSize) { if (newSize == 0) { oldBuffer.tryDispose(); return Buffers.EMPTY_BUFFER; } final int curBufSize = oldBuffer.capacity(); if (oldBuffer instanceof PoolBuffer) { if (curBufSi...
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { @Override public Buffer reallocate(final Buffer oldBuffer, final int newSize) { if (newSize == 0) { oldBuffer.tryDispose(); return Buffers.EMPTY_BUFFER; } final int curBufSize = oldBuffer.capacity(); if (oldBuffer instanceof PoolBuffer) { if (curBufSi...
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { @Override public Buffer reallocate(final Buffer oldBuffer, final int newSize) { if (newSize == 0) { oldBuffer.tryDispose(); return Buffers.EMPTY_BUFFER; } final int curBufSize = oldBuffer.capacity(); if (oldBuffer instanceof PoolBuffer) { if (curBufSi...
PooledMemoryManager implements MemoryManager<Buffer>, WrapperAware { @Override public Buffer reallocate(final Buffer oldBuffer, final int newSize) { if (newSize == 0) { oldBuffer.tryDispose(); return Buffers.EMPTY_BUFFER; } final int curBufSize = oldBuffer.capacity(); if (oldBuffer instanceof PoolBuffer) { if (curBufSi...
@Test public void testSimpleFileTransfer() throws Exception { TCPNIOTransport t = TCPNIOTransportBuilder.newInstance().build(); FilterChainBuilder builder = FilterChainBuilder.stateless(); final File f = generateTempFile(1024 * 1024); builder.add(new TransportFilter()); builder.add(new BaseFilter() { @Override public N...
@Override public int remaining() { return ((len > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) len); }
FileTransfer implements WritableMessage { @Override public int remaining() { return ((len > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) len); } }
FileTransfer implements WritableMessage { @Override public int remaining() { return ((len > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) len); } FileTransfer(final File f); FileTransfer(final File f, final long pos, final long len); }
FileTransfer implements WritableMessage { @Override public int remaining() { return ((len > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) len); } FileTransfer(final File f); FileTransfer(final File f, final long pos, final long len); long writeTo(final WritableByteChannel c); @Override boolean hasRemaining(); @Overri...
FileTransfer implements WritableMessage { @Override public int remaining() { return ((len > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) len); } FileTransfer(final File f); FileTransfer(final File f, final long pos, final long len); long writeTo(final WritableByteChannel c); @Override boolean hasRemaining(); @Overri...
@Test public void teste_onResume_withSyncedDataManager_shouldNotCallSync() { StubbedDataManager dataManager = new StubbedDataManager(); dataManager.setStatus(SyncStatus.SYNCED); FullfilledSupplier componenet_under_test = new FullfilledSupplier(dataManager); componenet_under_test.onResume(); assertThat(dataManager.syncC...
@Override public void onResume() { this.logger().log(Level.INFO, "On Resume"); dataManager().addObserver(this); this.logger().log(Level.INFO, "Syncstatus: " + this.dataManager().getSyncStatus()); switch (dataManager().getSyncStatus()) { case NOT_SYNCED: this.dataManager().sync(); break; case SYNCED: onSavingsUpdated();...
AbstractSupplier implements Observer, Supplier<T> { @Override public void onResume() { this.logger().log(Level.INFO, "On Resume"); dataManager().addObserver(this); this.logger().log(Level.INFO, "Syncstatus: " + this.dataManager().getSyncStatus()); switch (dataManager().getSyncStatus()) { case NOT_SYNCED: this.dataManag...
AbstractSupplier implements Observer, Supplier<T> { @Override public void onResume() { this.logger().log(Level.INFO, "On Resume"); dataManager().addObserver(this); this.logger().log(Level.INFO, "Syncstatus: " + this.dataManager().getSyncStatus()); switch (dataManager().getSyncStatus()) { case NOT_SYNCED: this.dataManag...
AbstractSupplier implements Observer, Supplier<T> { @Override public void onResume() { this.logger().log(Level.INFO, "On Resume"); dataManager().addObserver(this); this.logger().log(Level.INFO, "Syncstatus: " + this.dataManager().getSyncStatus()); switch (dataManager().getSyncStatus()) { case NOT_SYNCED: this.dataManag...
AbstractSupplier implements Observer, Supplier<T> { @Override public void onResume() { this.logger().log(Level.INFO, "On Resume"); dataManager().addObserver(this); this.logger().log(Level.INFO, "Syncstatus: " + this.dataManager().getSyncStatus()); switch (dataManager().getSyncStatus()) { case NOT_SYNCED: this.dataManag...
@Test public void teste_filter_withNotMatchingDay_shouldReturnLeave() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); Date expectedDate = sdf.parse("11/07/2017"); Date bookingDate = sdf.parse("12/07/2017"); Booking booking = new Booking(); booking.setDate(bookingDate); Transaction testTran...
@Override public boolean shouldBeRemoved(Transaction t) { return getZeroTimeDate(t.booking().getDate()).compareTo(this.day) != 0; }
OneDayFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { return getZeroTimeDate(t.booking().getDate()).compareTo(this.day) != 0; } }
OneDayFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { return getZeroTimeDate(t.booking().getDate()).compareTo(this.day) != 0; } OneDayFilter(Date day); }
OneDayFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { return getZeroTimeDate(t.booking().getDate()).compareTo(this.day) != 0; } OneDayFilter(Date day); @Override boolean shouldBeRemoved(Transaction t); }
OneDayFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { return getZeroTimeDate(t.booking().getDate()).compareTo(this.day) != 0; } OneDayFilter(Date day); @Override boolean shouldBeRemoved(Transaction t); }
@Test public void teste_hasItemsChecked_withEmptyMap_shouldReturnFalse() { ItemCheckedMap component_under_test = new ItemCheckedMap(new HashMap<String, Boolean>()); assertThat(component_under_test.hasItemsChecked()).isFalse(); }
public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; }
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } }
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } ItemCheckedMap(HashMap<String,...
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } ItemCheckedMap(HashMap<String,...
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } ItemCheckedMap(HashMap<String,...
@Test public void teste_hasItemsChecked_withFilledMapAndNothingChecked_shouldReturnFalse() { HashMap<String, Boolean> data = new HashMap<>(); data.put("test1", false); ItemCheckedMap component_under_test = new ItemCheckedMap(data); assertThat(component_under_test.hasItemsChecked()).isFalse(); }
public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; }
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } }
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } ItemCheckedMap(HashMap<String,...
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } ItemCheckedMap(HashMap<String,...
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } ItemCheckedMap(HashMap<String,...
@Test public void teste_hasItemsChecked_withMapwithCheckedItem_shouldReturnTrue() { HashMap<String, Boolean> data = new HashMap<>(); data.put("test1", true); ItemCheckedMap component_under_test = new ItemCheckedMap(data); assertThat(component_under_test.hasItemsChecked()).isTrue(); }
public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; }
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } }
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } ItemCheckedMap(HashMap<String,...
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } ItemCheckedMap(HashMap<String,...
ItemCheckedMap implements Filter<Transaction> { public boolean hasItemsChecked() { Boolean ret = false; Iterator iterator = this.map.entrySet().iterator(); while (iterator.hasNext() && !ret) { Map.Entry entry = (Map.Entry) iterator.next(); ret = (Boolean) entry.getValue(); } return ret; } ItemCheckedMap(HashMap<String,...
@Test public void teste_shouldBePresented_withNoKeyInMap_shouldReturnFalse() { HashMap<String, Boolean> data = new HashMap<>(); data.put("test2", true); ItemCheckedMap component_under_test = new ItemCheckedMap(data); assertThat(component_under_test.shouldBePresented("test1")).isFalse(); }
public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); }
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } }
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } ItemCheckedMap(HashMap<String, Boolean> map); }
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePresented(String bankAccountID); v...
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePresented(String bankAccountID); v...
@Test public void teste_shouldBePresented_withKeyInMapButValueIsFalse_shouldReturnFalse() { HashMap<String, Boolean> data = new HashMap<>(); data.put("test1", false); ItemCheckedMap component_under_test = new ItemCheckedMap(data); assertThat(component_under_test.shouldBePresented("test1")).isFalse(); }
public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); }
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } }
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } ItemCheckedMap(HashMap<String, Boolean> map); }
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePresented(String bankAccountID); v...
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePresented(String bankAccountID); v...
@Test public void teste_shouldBePresented_withWithKeyInMapAndValueTrue_shouldReturnTrue() { HashMap<String, Boolean> data = new HashMap<>(); data.put("test1", true); ItemCheckedMap component_under_test = new ItemCheckedMap(data); assertThat(component_under_test.shouldBePresented("test1")).isTrue(); }
public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); }
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } }
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } ItemCheckedMap(HashMap<String, Boolean> map); }
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePresented(String bankAccountID); v...
ItemCheckedMap implements Filter<Transaction> { public boolean shouldBePresented(String bankAccountID) { return this.map.containsKey(bankAccountID) && this.map.get(bankAccountID).booleanValue(); } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePresented(String bankAccountID); v...
@Test public void teste_shouldBeRemoved_withWithKeyInMapAndValueTrue_shouldReturnFalse() { HashMap<String, Boolean> data = new HashMap<>(); data.put("test1", true); ItemCheckedMap component_under_test = new ItemCheckedMap(data); assertThat(component_under_test.shouldBeRemoved(new Transaction(null, "test1", null))).isFa...
@Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; }
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } }
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } ItemCheckedMap(HashMap<String, Boolean> map); }
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePr...
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePr...
@Test public void teste_shouldBeRemoved_withWithKeyInMapAndValueFalse_shouldReturnTrue() { HashMap<String, Boolean> data = new HashMap<>(); data.put("test1", false); ItemCheckedMap component_under_test = new ItemCheckedMap(data); assertThat(component_under_test.shouldBeRemoved(new Transaction(null, "test1", null))).isT...
@Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; }
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } }
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } ItemCheckedMap(HashMap<String, Boolean> map); }
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePr...
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePr...
@Test public void teste_shouldBeRemoved_withNoData_shouldReturnFalse() { ItemCheckedMap component_under_test = new ItemCheckedMap(new HashMap<String, Boolean>()); assertThat(component_under_test.shouldBeRemoved(new Transaction(null, "test1", null))).isFalse(); }
@Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; }
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } }
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } ItemCheckedMap(HashMap<String, Boolean> map); }
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePr...
ItemCheckedMap implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if (this.map.isEmpty()) { return false; } boolean shouldStay = shouldBePresented(t.bankAccountID()); return !shouldStay; } ItemCheckedMap(HashMap<String, Boolean> map); boolean hasItemsChecked(); boolean shouldBePr...
@Test public void teste_addDataListening_shouldRegisterItselfOnDataManager() { StubbedDataManager dataManager = new StubbedDataManager(); FullfilledSupplier componenet_under_test = new FullfilledSupplier(dataManager); DummyDataListening dataListening = new DummyDataListening(); componenet_under_test.addDataListeningObj...
@Override public void addDataListeningObject(DataListening observer) { if (this.dataListenings.isEmpty()) { this.dataManager().addObserver(this); } this.dataListenings.add(observer); }
AbstractSupplier implements Observer, Supplier<T> { @Override public void addDataListeningObject(DataListening observer) { if (this.dataListenings.isEmpty()) { this.dataManager().addObserver(this); } this.dataListenings.add(observer); } }
AbstractSupplier implements Observer, Supplier<T> { @Override public void addDataListeningObject(DataListening observer) { if (this.dataListenings.isEmpty()) { this.dataManager().addObserver(this); } this.dataListenings.add(observer); } }
AbstractSupplier implements Observer, Supplier<T> { @Override public void addDataListeningObject(DataListening observer) { if (this.dataListenings.isEmpty()) { this.dataManager().addObserver(this); } this.dataListenings.add(observer); } @Override List<T> getAll(); @Override void onResume(); @Override void addDataListe...
AbstractSupplier implements Observer, Supplier<T> { @Override public void addDataListeningObject(DataListening observer) { if (this.dataListenings.isEmpty()) { this.dataManager().addObserver(this); } this.dataListenings.add(observer); } @Override List<T> getAll(); @Override void onResume(); @Override void addDataListe...
@Test public void getAmountDelta_noBookings() { double amount = 123.456; BankingDateInformation bankingDateInformation = new BankingDateInformation(amount, new StubbedBankTransactionSupplier()); assertThat(bankingDateInformation.getAmountDelta()).isZero(); }
public double getAmountDelta() { double amountDelta = 0.0; for (Transaction transaction : this.transactionSupplier.getAll()) { amountDelta += transaction.booking().getAmount(); } return amountDelta; }
BankingDateInformation { public double getAmountDelta() { double amountDelta = 0.0; for (Transaction transaction : this.transactionSupplier.getAll()) { amountDelta += transaction.booking().getAmount(); } return amountDelta; } }
BankingDateInformation { public double getAmountDelta() { double amountDelta = 0.0; for (Transaction transaction : this.transactionSupplier.getAll()) { amountDelta += transaction.booking().getAmount(); } return amountDelta; } BankingDateInformation(double amount, Supplier<Transaction> transactionSupplier); }
BankingDateInformation { public double getAmountDelta() { double amountDelta = 0.0; for (Transaction transaction : this.transactionSupplier.getAll()) { amountDelta += transaction.booking().getAmount(); } return amountDelta; } BankingDateInformation(double amount, Supplier<Transaction> transactionSupplier); double getAm...
BankingDateInformation { public double getAmountDelta() { double amountDelta = 0.0; for (Transaction transaction : this.transactionSupplier.getAll()) { amountDelta += transaction.booking().getAmount(); } return amountDelta; } BankingDateInformation(double amount, Supplier<Transaction> transactionSupplier); double getAm...
@Test public void getAmountDelta_bookings() { double amount = 123.456; double amount1 = 500.00; double amount2 = -100.00; Booking booking1 = new Booking(new Date(), amount1); Transaction transaction1 = new Transaction("some name","some id",booking1); Booking booking2 = new Booking(new Date(), amount2); Transaction tran...
public double getAmountDelta() { double amountDelta = 0.0; for (Transaction transaction : this.transactionSupplier.getAll()) { amountDelta += transaction.booking().getAmount(); } return amountDelta; }
BankingDateInformation { public double getAmountDelta() { double amountDelta = 0.0; for (Transaction transaction : this.transactionSupplier.getAll()) { amountDelta += transaction.booking().getAmount(); } return amountDelta; } }
BankingDateInformation { public double getAmountDelta() { double amountDelta = 0.0; for (Transaction transaction : this.transactionSupplier.getAll()) { amountDelta += transaction.booking().getAmount(); } return amountDelta; } BankingDateInformation(double amount, Supplier<Transaction> transactionSupplier); }
BankingDateInformation { public double getAmountDelta() { double amountDelta = 0.0; for (Transaction transaction : this.transactionSupplier.getAll()) { amountDelta += transaction.booking().getAmount(); } return amountDelta; } BankingDateInformation(double amount, Supplier<Transaction> transactionSupplier); double getAm...
BankingDateInformation { public double getAmountDelta() { double amountDelta = 0.0; for (Transaction transaction : this.transactionSupplier.getAll()) { amountDelta += transaction.booking().getAmount(); } return amountDelta; } BankingDateInformation(double amount, Supplier<Transaction> transactionSupplier); double getAm...
@Test public void teste_compare_withEqualSavings_shouldReturnZero() { SavingsComparator component_under_test = new SavingsComparator(); SavingsAccount account = new SavingsAccount(123, "some anme", 10, 0, any(), any()); assertThat(component_under_test.compare(account, account)).isEqualTo(0); }
@Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } @Override int compare(SavingsAccount t1, SavingsAccount t2); }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } @Override int compare(SavingsAccount t1, SavingsAccount t2); }
@Test public void teste_compare_firstDateLaterThenSecond_shouldReturnOne() throws Exception { SavingsComparator component_under_test = new SavingsComparator(); SavingsAccount earlyAccount = new SavingsAccount(123, "some anme", 10, 0, toDate("10/10/16"), any()); SavingsAccount lateAccount = new SavingsAccount(123, "some...
@Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } @Override int compare(SavingsAccount t1, SavingsAccount t2); }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } @Override int compare(SavingsAccount t1, SavingsAccount t2); }
@Test public void teste_compare_firstDateBeforeThenSecond_shouldReturnMinusOne() throws Exception { SavingsComparator component_under_test = new SavingsComparator(); SavingsAccount earlyAccount = new SavingsAccount(123, "some anme", 10, 0, toDate("10/10/16"), any()); SavingsAccount lateAccount = new SavingsAccount(123,...
@Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } @Override int compare(SavingsAccount t1, SavingsAccount t2); }
SavingsComparator implements Comparator<SavingsAccount> { @Override public int compare(SavingsAccount t1, SavingsAccount t2) { return t1.getFinaldate().compareTo(t2.getFinaldate()); } @Override int compare(SavingsAccount t1, SavingsAccount t2); }
@Test public void getAccessesBinderCalled() { DummyBankAccessEndpoint endpoint = mock(DummyBankAccessEndpoint.class); when(bankingApiBinder.getBankAccessEndpoint(anyString())).thenReturn(endpoint); BankingApiFacade bankingApiFacade = new BankingApiFacade(bankingApiBinder); try { bankingApiFacade.getBankAccesses("test")...
public List<BankAccessBankingModel> getBankAccesses(final String userId) throws BankingException { return binder.getBankAccessEndpoint(userId).getBankAccesses(); }
BankingApiFacade { public List<BankAccessBankingModel> getBankAccesses(final String userId) throws BankingException { return binder.getBankAccessEndpoint(userId).getBankAccesses(); } }
BankingApiFacade { public List<BankAccessBankingModel> getBankAccesses(final String userId) throws BankingException { return binder.getBankAccessEndpoint(userId).getBankAccesses(); } @Autowired BankingApiFacade(final BankingApiBinder binder); protected BankingApiFacade(); }
BankingApiFacade { public List<BankAccessBankingModel> getBankAccesses(final String userId) throws BankingException { return binder.getBankAccessEndpoint(userId).getBankAccesses(); } @Autowired BankingApiFacade(final BankingApiBinder binder); protected BankingApiFacade(); List<BankAccessBankingModel> getBankAccesses(...
BankingApiFacade { public List<BankAccessBankingModel> getBankAccesses(final String userId) throws BankingException { return binder.getBankAccessEndpoint(userId).getBankAccesses(); } @Autowired BankingApiFacade(final BankingApiBinder binder); protected BankingApiFacade(); List<BankAccessBankingModel> getBankAccesses(...
@Test public void getAccountsBinderCalled() { DummyBankAccountEndpoint endpoint = mock(DummyBankAccountEndpoint.class); when(bankingApiBinder.getBankAccountEndpoint(anyString())).thenReturn(endpoint); BankingApiFacade bankingApiFacade = new BankingApiFacade(bankingApiBinder); try { bankingApiFacade.getBankAccounts("tes...
public List<BankAccountBankingModel> getBankAccounts(final String userId, final String bankAccessId) throws BankingException { return binder.getBankAccountEndpoint(userId).getBankAccounts(bankAccessId); }
BankingApiFacade { public List<BankAccountBankingModel> getBankAccounts(final String userId, final String bankAccessId) throws BankingException { return binder.getBankAccountEndpoint(userId).getBankAccounts(bankAccessId); } }
BankingApiFacade { public List<BankAccountBankingModel> getBankAccounts(final String userId, final String bankAccessId) throws BankingException { return binder.getBankAccountEndpoint(userId).getBankAccounts(bankAccessId); } @Autowired BankingApiFacade(final BankingApiBinder binder); protected BankingApiFacade(); }
BankingApiFacade { public List<BankAccountBankingModel> getBankAccounts(final String userId, final String bankAccessId) throws BankingException { return binder.getBankAccountEndpoint(userId).getBankAccounts(bankAccessId); } @Autowired BankingApiFacade(final BankingApiBinder binder); protected BankingApiFacade(); List...
BankingApiFacade { public List<BankAccountBankingModel> getBankAccounts(final String userId, final String bankAccessId) throws BankingException { return binder.getBankAccountEndpoint(userId).getBankAccounts(bankAccessId); } @Autowired BankingApiFacade(final BankingApiBinder binder); protected BankingApiFacade(); List...
@Test public void syncAccountBinderCalled() { DummyBankAccountEndpoint endpoint = mock(DummyBankAccountEndpoint.class); when(bankingApiBinder.getBankAccountEndpoint(anyString())).thenReturn(endpoint); BankingApiFacade bankingApiFacade = new BankingApiFacade(bankingApiBinder); try { bankingApiFacade.syncBankAccount("tes...
public List<BookingModel> syncBankAccount(final String userId, final String bankAccessId, final String bankAccountId, final String pin) throws BankingException { return binder.getBankAccountEndpoint(userId).syncBankAccount(bankAccessId, bankAccountId, pin); }
BankingApiFacade { public List<BookingModel> syncBankAccount(final String userId, final String bankAccessId, final String bankAccountId, final String pin) throws BankingException { return binder.getBankAccountEndpoint(userId).syncBankAccount(bankAccessId, bankAccountId, pin); } }
BankingApiFacade { public List<BookingModel> syncBankAccount(final String userId, final String bankAccessId, final String bankAccountId, final String pin) throws BankingException { return binder.getBankAccountEndpoint(userId).syncBankAccount(bankAccessId, bankAccountId, pin); } @Autowired BankingApiFacade(final Bankin...
BankingApiFacade { public List<BookingModel> syncBankAccount(final String userId, final String bankAccessId, final String bankAccountId, final String pin) throws BankingException { return binder.getBankAccountEndpoint(userId).syncBankAccount(bankAccessId, bankAccountId, pin); } @Autowired BankingApiFacade(final Bankin...
BankingApiFacade { public List<BookingModel> syncBankAccount(final String userId, final String bankAccessId, final String bankAccountId, final String pin) throws BankingException { return binder.getBankAccountEndpoint(userId).syncBankAccount(bankAccessId, bankAccountId, pin); } @Autowired BankingApiFacade(final Bankin...
@Test public void getBankAccountsAccountsExist() throws Exception { String testUserId = "userId"; DummyBankAccessEndpoint dummyBankAccessEndpoint = mock(DummyBankAccessEndpoint.class); DummyBankAccountBankingModelRepository dummyBankAccountBankingModelRepository = mock(DummyBankAccountBankingModelRepository.class); Dum...
@Override public List<BankAccountBankingModel> getBankAccounts(String bankingAccessId) throws BankingException { if (!dummyBankAccessEndpoint.existsBankAccess(bankingAccessId)) { return new ArrayList<BankAccountBankingModel>(); } if (!bankAccountBankingModelRepository.existBankAccountsForAccessId(bankingAccessId)) { th...
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BankAccountBankingModel> getBankAccounts(String bankingAccessId) throws BankingException { if (!dummyBankAccessEndpoint.existsBankAccess(bankingAccessId)) { return new ArrayList<BankAccountBankingModel>(); } if (!bankAccountBankingModelRepo...
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BankAccountBankingModel> getBankAccounts(String bankingAccessId) throws BankingException { if (!dummyBankAccessEndpoint.existsBankAccess(bankingAccessId)) { return new ArrayList<BankAccountBankingModel>(); } if (!bankAccountBankingModelRepo...
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BankAccountBankingModel> getBankAccounts(String bankingAccessId) throws BankingException { if (!dummyBankAccessEndpoint.existsBankAccess(bankingAccessId)) { return new ArrayList<BankAccountBankingModel>(); } if (!bankAccountBankingModelRepo...
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BankAccountBankingModel> getBankAccounts(String bankingAccessId) throws BankingException { if (!dummyBankAccessEndpoint.existsBankAccess(bankingAccessId)) { return new ArrayList<BankAccountBankingModel>(); } if (!bankAccountBankingModelRepo...
@Test public void getBankAccountsAccountsNotExist() throws Exception { String testUserId = "userId"; DummyBankAccessEndpoint dummyBankAccessEndpoint = mock(DummyBankAccessEndpoint.class); DummyBankAccountBankingModelRepository dummyBankAccountBankingModelRepository = mock(DummyBankAccountBankingModelRepository.class); ...
@Override public List<BankAccountBankingModel> getBankAccounts(String bankingAccessId) throws BankingException { if (!dummyBankAccessEndpoint.existsBankAccess(bankingAccessId)) { return new ArrayList<BankAccountBankingModel>(); } if (!bankAccountBankingModelRepository.existBankAccountsForAccessId(bankingAccessId)) { th...
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BankAccountBankingModel> getBankAccounts(String bankingAccessId) throws BankingException { if (!dummyBankAccessEndpoint.existsBankAccess(bankingAccessId)) { return new ArrayList<BankAccountBankingModel>(); } if (!bankAccountBankingModelRepo...
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BankAccountBankingModel> getBankAccounts(String bankingAccessId) throws BankingException { if (!dummyBankAccessEndpoint.existsBankAccess(bankingAccessId)) { return new ArrayList<BankAccountBankingModel>(); } if (!bankAccountBankingModelRepo...
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BankAccountBankingModel> getBankAccounts(String bankingAccessId) throws BankingException { if (!dummyBankAccessEndpoint.existsBankAccess(bankingAccessId)) { return new ArrayList<BankAccountBankingModel>(); } if (!bankAccountBankingModelRepo...
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BankAccountBankingModel> getBankAccounts(String bankingAccessId) throws BankingException { if (!dummyBankAccessEndpoint.existsBankAccess(bankingAccessId)) { return new ArrayList<BankAccountBankingModel>(); } if (!bankAccountBankingModelRepo...
@Test public void test_initialState_isNotInSync(){ FullfilledDataManager component_under_test = new FullfilledDataManager(new StubbedSavingsProvider()); assertThat(component_under_test.getSyncStatus()).isEqualTo(SyncStatus.NOT_SYNCED); }
@Override public SyncStatus getSyncStatus() { return syncStatus; }
AbstractDataManager extends Observable implements DataManager<T> { @Override public SyncStatus getSyncStatus() { return syncStatus; } }
AbstractDataManager extends Observable implements DataManager<T> { @Override public SyncStatus getSyncStatus() { return syncStatus; } AbstractDataManager(DataProvider<T> dataProvider); }
AbstractDataManager extends Observable implements DataManager<T> { @Override public SyncStatus getSyncStatus() { return syncStatus; } AbstractDataManager(DataProvider<T> dataProvider); @Override void sync(); @Override SyncStatus getSyncStatus(); @Override List<T> getAll(); @Override void add(final T element, final Serv...
AbstractDataManager extends Observable implements DataManager<T> { @Override public SyncStatus getSyncStatus() { return syncStatus; } AbstractDataManager(DataProvider<T> dataProvider); @Override void sync(); @Override SyncStatus getSyncStatus(); @Override List<T> getAll(); @Override void add(final T element, final Serv...
@Test public void syncBankAccountsAccountsNotExist() throws Exception { String testUserId = "userId"; DummyBankAccessEndpoint dummyBankAccessEndpoint = mock(DummyBankAccessEndpoint.class); DummyBankAccountBankingModelRepository dummyBankAccountBankingModelRepository = mock(DummyBankAccountBankingModelRepository.class);...
@Override public List<BookingModel> syncBankAccount(String bankAccessId, String bankAccountId, String pin) throws BankingException { if (!bookingModelMap.containsKey(bankAccountId)) { generateDummyBookingModels(bankAccountId); updateAccountBalance(bankAccountId); } return bookingModelMap.get(bankAccountId); }
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BookingModel> syncBankAccount(String bankAccessId, String bankAccountId, String pin) throws BankingException { if (!bookingModelMap.containsKey(bankAccountId)) { generateDummyBookingModels(bankAccountId); updateAccountBalance(bankAccountId)...
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BookingModel> syncBankAccount(String bankAccessId, String bankAccountId, String pin) throws BankingException { if (!bookingModelMap.containsKey(bankAccountId)) { generateDummyBookingModels(bankAccountId); updateAccountBalance(bankAccountId)...
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BookingModel> syncBankAccount(String bankAccessId, String bankAccountId, String pin) throws BankingException { if (!bookingModelMap.containsKey(bankAccountId)) { generateDummyBookingModels(bankAccountId); updateAccountBalance(bankAccountId)...
DummyBankAccountEndpoint implements BankAccountEndpoint { @Override public List<BookingModel> syncBankAccount(String bankAccessId, String bankAccountId, String pin) throws BankingException { if (!bookingModelMap.containsKey(bankAccountId)) { generateDummyBookingModels(bankAccountId); updateAccountBalance(bankAccountId)...
@Test public void getBankAccountEndpointDummy() { String username = "test@user.de"; BankingApiBinder bankingApiBinder = new BankingApiBinder(this.bankingApiConfiguration, null, null, new HttpBankAccountEndpoint(null, null), new DummyBankAccountEndpoint(null, null, null)); BankAccountEndpoint endpoint = bankingApiBinder...
BankAccountEndpoint getBankAccountEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccountEndpoint : httpBankAccountEndpoint; }
BankingApiBinder { BankAccountEndpoint getBankAccountEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccountEndpoint : httpBankAccountEndpoint; } }
BankingApiBinder { BankAccountEndpoint getBankAccountEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccountEndpoint : httpBankAccountEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEnd...
BankingApiBinder { BankAccountEndpoint getBankAccountEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccountEndpoint : httpBankAccountEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEnd...
BankingApiBinder { BankAccountEndpoint getBankAccountEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccountEndpoint : httpBankAccountEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEnd...
@Test public void getBankAccountEndpointHttp() { String username = "!test@user.de"; BankingApiBinder bankingApiBinder = new BankingApiBinder(this.bankingApiConfiguration, null, null, new HttpBankAccountEndpoint(null, null), new DummyBankAccountEndpoint(null, null, null)); BankAccountEndpoint endpoint = bankingApiBinder...
BankAccountEndpoint getBankAccountEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccountEndpoint : httpBankAccountEndpoint; }
BankingApiBinder { BankAccountEndpoint getBankAccountEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccountEndpoint : httpBankAccountEndpoint; } }
BankingApiBinder { BankAccountEndpoint getBankAccountEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccountEndpoint : httpBankAccountEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEnd...
BankingApiBinder { BankAccountEndpoint getBankAccountEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccountEndpoint : httpBankAccountEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEnd...
BankingApiBinder { BankAccountEndpoint getBankAccountEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccountEndpoint : httpBankAccountEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEnd...
@Test public void getBankAccessEndpointDummy() { String username = "test@user.de"; BankingApiBinder bankingApiBinder = new BankingApiBinder(this.bankingApiConfiguration, new HttpBankAccessEndpoint(null, null), new DummyBankAccessEndpoint(), null, null); BankAccessEndpoint endpoint = bankingApiBinder.getBankAccessEndpoi...
BankAccessEndpoint getBankAccessEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccessEndpoint : httpBankAccessEndpoint; }
BankingApiBinder { BankAccessEndpoint getBankAccessEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccessEndpoint : httpBankAccessEndpoint; } }
BankingApiBinder { BankAccessEndpoint getBankAccessEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccessEndpoint : httpBankAccessEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEndpoin...
BankingApiBinder { BankAccessEndpoint getBankAccessEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccessEndpoint : httpBankAccessEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEndpoin...
BankingApiBinder { BankAccessEndpoint getBankAccessEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccessEndpoint : httpBankAccessEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEndpoin...
@Test public void getBankAccessEndpointHttp() { String username = "!test@user.de"; BankingApiBinder bankingApiBinder = new BankingApiBinder(this.bankingApiConfiguration, new HttpBankAccessEndpoint(null, null), new DummyBankAccessEndpoint(), null, null); BankAccessEndpoint endpoint = bankingApiBinder.getBankAccessEndpoi...
BankAccessEndpoint getBankAccessEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccessEndpoint : httpBankAccessEndpoint; }
BankingApiBinder { BankAccessEndpoint getBankAccessEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccessEndpoint : httpBankAccessEndpoint; } }
BankingApiBinder { BankAccessEndpoint getBankAccessEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccessEndpoint : httpBankAccessEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEndpoin...
BankingApiBinder { BankAccessEndpoint getBankAccessEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccessEndpoint : httpBankAccessEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEndpoin...
BankingApiBinder { BankAccessEndpoint getBankAccessEndpoint(final String userId) { return isTestUser(userId) ? dummyBankAccessEndpoint : httpBankAccessEndpoint; } @Autowired BankingApiBinder(final BankingApiConfiguration bankingApiConfiguration, @Qualifier("default") final BankAccessEndpoin...
@Test public void addRepositoryCalled() throws Exception { String testUser = "user"; String testBankCode = "testCode"; String testBankLogin = "testLogin"; BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setUserId(testUser); bankAccessBankingModel.setBankLogin(testBan...
@Override public BankAccessBankingModel addBankAccess(BankAccessBankingModel bankAccess) throws BankingException { BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setId("TestID" + number + "_" + System.nanoTime()); bankAccessBankingModel.setBankLogin(bankAccess.getBa...
DummyBankAccessEndpoint implements BankAccessEndpoint { @Override public BankAccessBankingModel addBankAccess(BankAccessBankingModel bankAccess) throws BankingException { BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setId("TestID" + number + "_" + System.nanoTime(...
DummyBankAccessEndpoint implements BankAccessEndpoint { @Override public BankAccessBankingModel addBankAccess(BankAccessBankingModel bankAccess) throws BankingException { BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setId("TestID" + number + "_" + System.nanoTime(...
DummyBankAccessEndpoint implements BankAccessEndpoint { @Override public BankAccessBankingModel addBankAccess(BankAccessBankingModel bankAccess) throws BankingException { BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setId("TestID" + number + "_" + System.nanoTime(...
DummyBankAccessEndpoint implements BankAccessEndpoint { @Override public BankAccessBankingModel addBankAccess(BankAccessBankingModel bankAccess) throws BankingException { BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setId("TestID" + number + "_" + System.nanoTime(...
@Test public void existsRepositoryCalled() throws Exception { String testId = "test"; DummyBankAccessEndpointRepository dummyBankAccessEndpointRepository = mock(DummyBankAccessEndpointRepository.class); when(dummyBankAccessEndpointRepository.exists(anyString())).thenReturn(true); DummyBankAccessEndpoint dummyBankAccess...
public boolean existsBankAccess(String bankAccessId) { return bankAccessEndpointRepository.exists(bankAccessId); }
DummyBankAccessEndpoint implements BankAccessEndpoint { public boolean existsBankAccess(String bankAccessId) { return bankAccessEndpointRepository.exists(bankAccessId); } }
DummyBankAccessEndpoint implements BankAccessEndpoint { public boolean existsBankAccess(String bankAccessId) { return bankAccessEndpointRepository.exists(bankAccessId); } DummyBankAccessEndpoint(DummyBankAccessEndpointRepository bankAccessEndpointRepository); DummyBankAccessEndpoint(); }
DummyBankAccessEndpoint implements BankAccessEndpoint { public boolean existsBankAccess(String bankAccessId) { return bankAccessEndpointRepository.exists(bankAccessId); } DummyBankAccessEndpoint(DummyBankAccessEndpointRepository bankAccessEndpointRepository); DummyBankAccessEndpoint(); @Override List<BankAccessBanking...
DummyBankAccessEndpoint implements BankAccessEndpoint { public boolean existsBankAccess(String bankAccessId) { return bankAccessEndpointRepository.exists(bankAccessId); } DummyBankAccessEndpoint(DummyBankAccessEndpointRepository bankAccessEndpointRepository); DummyBankAccessEndpoint(); @Override List<BankAccessBanking...
@Test public void getRepositoryCalled() throws Exception { String testId = "test"; DummyBankAccessEndpointRepository dummyBankAccessEndpointRepository = mock(DummyBankAccessEndpointRepository.class); when(dummyBankAccessEndpointRepository.findAll()).thenReturn(new ArrayList<DummyBankAccessBankingModelEntity>()); DummyB...
@Override public List<BankAccessBankingModel> getBankAccesses() throws BankingException { List<DummyBankAccessBankingModelEntity> dummyBankAccessBankingModelEntities = bankAccessEndpointRepository.findAll(); List<BankAccessBankingModel> bankAccessBankingModelList = new ArrayList<>(); for (DummyBankAccessBankingModelEnt...
DummyBankAccessEndpoint implements BankAccessEndpoint { @Override public List<BankAccessBankingModel> getBankAccesses() throws BankingException { List<DummyBankAccessBankingModelEntity> dummyBankAccessBankingModelEntities = bankAccessEndpointRepository.findAll(); List<BankAccessBankingModel> bankAccessBankingModelList ...
DummyBankAccessEndpoint implements BankAccessEndpoint { @Override public List<BankAccessBankingModel> getBankAccesses() throws BankingException { List<DummyBankAccessBankingModelEntity> dummyBankAccessBankingModelEntities = bankAccessEndpointRepository.findAll(); List<BankAccessBankingModel> bankAccessBankingModelList ...
DummyBankAccessEndpoint implements BankAccessEndpoint { @Override public List<BankAccessBankingModel> getBankAccesses() throws BankingException { List<DummyBankAccessBankingModelEntity> dummyBankAccessBankingModelEntities = bankAccessEndpointRepository.findAll(); List<BankAccessBankingModel> bankAccessBankingModelList ...
DummyBankAccessEndpoint implements BankAccessEndpoint { @Override public List<BankAccessBankingModel> getBankAccesses() throws BankingException { List<DummyBankAccessBankingModelEntity> dummyBankAccessBankingModelEntities = bankAccessEndpointRepository.findAll(); List<BankAccessBankingModel> bankAccessBankingModelList ...
@Test(expected = ServletException.class) public void filterEmailNull() throws IOException, ServletException { UserRegistrationFilter userRegistrationFilter = new UserRegistrationFilter( setupKeycloakUtilizer(null, "first", "last"), authenticationController); userRegistrationFilter.doFilter(servletRequest, servletRespon...
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer.getLastName(); if (email == null || email.isEmpty(...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
@Test(expected = ServletException.class) public void filterEmailEmpty() throws IOException, ServletException { UserRegistrationFilter userRegistrationFilter = new UserRegistrationFilter( setupKeycloakUtilizer("", "first", "last"), authenticationController); userRegistrationFilter.doFilter(servletRequest, servletRespons...
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer.getLastName(); if (email == null || email.isEmpty(...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
@Test public void test_add_shouldAddItemOnDataProvider() throws Exception{ StubbedSavingsProvider dataProvider = new StubbedSavingsProvider(); FullfilledDataManager component_under_test = new FullfilledDataManager(dataProvider); SavingsAccount savingsAccount = new SavingsAccount(); component_under_test.add(savingsAccou...
@Override public void add(final T element, final ServerCallStatusHandler handler) { logger().info("Adding element: " + element); Consumer<StringApiModel> onNext = new Consumer<StringApiModel>() { @Override public void accept(@NonNull final StringApiModel s) throws Exception { handler.onOk(); AbstractDataManager.this.sy...
AbstractDataManager extends Observable implements DataManager<T> { @Override public void add(final T element, final ServerCallStatusHandler handler) { logger().info("Adding element: " + element); Consumer<StringApiModel> onNext = new Consumer<StringApiModel>() { @Override public void accept(@NonNull final StringApiMode...
AbstractDataManager extends Observable implements DataManager<T> { @Override public void add(final T element, final ServerCallStatusHandler handler) { logger().info("Adding element: " + element); Consumer<StringApiModel> onNext = new Consumer<StringApiModel>() { @Override public void accept(@NonNull final StringApiMode...
AbstractDataManager extends Observable implements DataManager<T> { @Override public void add(final T element, final ServerCallStatusHandler handler) { logger().info("Adding element: " + element); Consumer<StringApiModel> onNext = new Consumer<StringApiModel>() { @Override public void accept(@NonNull final StringApiMode...
AbstractDataManager extends Observable implements DataManager<T> { @Override public void add(final T element, final ServerCallStatusHandler handler) { logger().info("Adding element: " + element); Consumer<StringApiModel> onNext = new Consumer<StringApiModel>() { @Override public void accept(@NonNull final StringApiMode...
@Test(expected = ServletException.class) public void filterFirstNameNull() throws IOException, ServletException { UserRegistrationFilter userRegistrationFilter = new UserRegistrationFilter( setupKeycloakUtilizer("test@mock.de", null, "last"), authenticationController); userRegistrationFilter.doFilter(servletRequest, se...
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer.getLastName(); if (email == null || email.isEmpty(...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
@Test(expected = ServletException.class) public void filterFirstNameEmpty() throws IOException, ServletException { UserRegistrationFilter userRegistrationFilter = new UserRegistrationFilter( setupKeycloakUtilizer("test@mock.de", "", "last"), authenticationController); userRegistrationFilter.doFilter(servletRequest, ser...
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer.getLastName(); if (email == null || email.isEmpty(...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
@Test(expected = ServletException.class) public void filterLastNameNull() throws IOException, ServletException { UserRegistrationFilter userRegistrationFilter = new UserRegistrationFilter( setupKeycloakUtilizer("test@mock.de", "first", null), authenticationController); userRegistrationFilter.doFilter(servletRequest, se...
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer.getLastName(); if (email == null || email.isEmpty(...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
@Test(expected = ServletException.class) public void filterLastNameEmpty() throws IOException, ServletException { UserRegistrationFilter userRegistrationFilter = new UserRegistrationFilter( setupKeycloakUtilizer("test@mock.de", "first", null), authenticationController); userRegistrationFilter.doFilter(servletRequest, s...
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer.getLastName(); if (email == null || email.isEmpty(...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
@Test public void filterUserNotExists() throws IOException, ServletException, VirtualLedgerAuthenticationException, UserAlreadyExistsException { when(authenticationController.register(any(User.class))).thenReturn("test"); UserRegistrationFilter userRegistrationFilter = new UserRegistrationFilter( setupKeycloakUtilizer(...
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer.getLastName(); if (email == null || email.isEmpty(...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
@Test public void filterUserExists() throws IOException, ServletException, VirtualLedgerAuthenticationException, UserAlreadyExistsException { when(authenticationController.register(any(User.class))).thenThrow(new UserAlreadyExistsException()); UserRegistrationFilter userRegistrationFilter = new UserRegistrationFilter( ...
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer.getLastName(); if (email == null || email.isEmpty(...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
@Test(expected = ServletException.class) public void filterVirtualLedgerAuthenticationExceptionThrown() throws IOException, ServletException, VirtualLedgerAuthenticationException, UserAlreadyExistsException { when(authenticationController.register(any(User.class))).thenThrow(new VirtualLedgerAuthenticationException("mo...
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer.getLastName(); if (email == null || email.isEmpty(...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
UserRegistrationFilter extends GenericFilterBean { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String email = keycloakUtilizer.getEmail(); String firstName = keycloakUtilizer.getFirstName(); String lastName = keycloakUtilizer...
@Test(expected = UserAlreadyExistsException.class) public void testRegisterWithExistingUserShouldThrowException() throws Exception { UserRepository userRepositoryMock = mock(UserRepository.class); when(userRepositoryMock.existsUserWithEmail(someEmail())).thenReturn(Boolean.TRUE); AuthenticationController componentUnder...
public String register(User user) throws VirtualLedgerAuthenticationException, UserAlreadyExistsException { if (user == null || user.getEmail() == null || user.getFirstName() == null || user.getLastName() == null) { throw new VirtualLedgerAuthenticationException( "Please check your inserts! At least one was not formatt...
AuthenticationController { public String register(User user) throws VirtualLedgerAuthenticationException, UserAlreadyExistsException { if (user == null || user.getEmail() == null || user.getFirstName() == null || user.getLastName() == null) { throw new VirtualLedgerAuthenticationException( "Please check your inserts! A...
AuthenticationController { public String register(User user) throws VirtualLedgerAuthenticationException, UserAlreadyExistsException { if (user == null || user.getEmail() == null || user.getFirstName() == null || user.getLastName() == null) { throw new VirtualLedgerAuthenticationException( "Please check your inserts! A...
AuthenticationController { public String register(User user) throws VirtualLedgerAuthenticationException, UserAlreadyExistsException { if (user == null || user.getEmail() == null || user.getFirstName() == null || user.getLastName() == null) { throw new VirtualLedgerAuthenticationException( "Please check your inserts! A...
AuthenticationController { public String register(User user) throws VirtualLedgerAuthenticationException, UserAlreadyExistsException { if (user == null || user.getEmail() == null || user.getFirstName() == null || user.getLastName() == null) { throw new VirtualLedgerAuthenticationException( "Please check your inserts! A...
@Test public void testRegisterWithValidUserShouldRegister() throws Exception { UserRepository userRepositoryMock = mock(UserRepository.class); AuthenticationController componentUnderTest = new AuthenticationController(userRepositoryMock); String result = componentUnderTest.register(getValidUserCredential()); assertThat...
public String register(User user) throws VirtualLedgerAuthenticationException, UserAlreadyExistsException { if (user == null || user.getEmail() == null || user.getFirstName() == null || user.getLastName() == null) { throw new VirtualLedgerAuthenticationException( "Please check your inserts! At least one was not formatt...
AuthenticationController { public String register(User user) throws VirtualLedgerAuthenticationException, UserAlreadyExistsException { if (user == null || user.getEmail() == null || user.getFirstName() == null || user.getLastName() == null) { throw new VirtualLedgerAuthenticationException( "Please check your inserts! A...
AuthenticationController { public String register(User user) throws VirtualLedgerAuthenticationException, UserAlreadyExistsException { if (user == null || user.getEmail() == null || user.getFirstName() == null || user.getLastName() == null) { throw new VirtualLedgerAuthenticationException( "Please check your inserts! A...
AuthenticationController { public String register(User user) throws VirtualLedgerAuthenticationException, UserAlreadyExistsException { if (user == null || user.getEmail() == null || user.getFirstName() == null || user.getLastName() == null) { throw new VirtualLedgerAuthenticationException( "Please check your inserts! A...
AuthenticationController { public String register(User user) throws VirtualLedgerAuthenticationException, UserAlreadyExistsException { if (user == null || user.getEmail() == null || user.getFirstName() == null || user.getLastName() == null) { throw new VirtualLedgerAuthenticationException( "Please check your inserts! A...
@Test public void createSuccessful() { String testString = "test"; StringApiModel stringApiModel = stringApiModelFactory.createStringApiModel(testString); Assert.assertNotNull(stringApiModel); Assert.assertEquals(testString, stringApiModel.getData()); }
public StringApiModel createStringApiModel(String string) { StringApiModel stringApiModel = new StringApiModel(); stringApiModel.setData(string); return stringApiModel; }
StringApiModelFactory { public StringApiModel createStringApiModel(String string) { StringApiModel stringApiModel = new StringApiModel(); stringApiModel.setData(string); return stringApiModel; } }
StringApiModelFactory { public StringApiModel createStringApiModel(String string) { StringApiModel stringApiModel = new StringApiModel(); stringApiModel.setData(string); return stringApiModel; } }
StringApiModelFactory { public StringApiModel createStringApiModel(String string) { StringApiModel stringApiModel = new StringApiModel(); stringApiModel.setData(string); return stringApiModel; } StringApiModel createStringApiModel(String string); }
StringApiModelFactory { public StringApiModel createStringApiModel(String string) { StringApiModel stringApiModel = new StringApiModel(); stringApiModel.setData(string); return stringApiModel; } StringApiModel createStringApiModel(String string); }
@Test(expected = IllegalStateException.class) public void test_initialState_get_shouldThrowIllegalArgumentException() throws Exception{ FullfilledDataManager component_under_test = new FullfilledDataManager(new StubbedSavingsProvider()); component_under_test.getAll(); }
@Override public List<T> getAll() throws SyncFailedException { if (syncFailedException != null) throw syncFailedException; if (syncStatus != SYNCED) throw new IllegalStateException("Sync not completed"); logger().info("Number items synct: " + this.allCachedItems.size()); return new LinkedList<>(allCachedItems); }
AbstractDataManager extends Observable implements DataManager<T> { @Override public List<T> getAll() throws SyncFailedException { if (syncFailedException != null) throw syncFailedException; if (syncStatus != SYNCED) throw new IllegalStateException("Sync not completed"); logger().info("Number items synct: " + this.allCa...
AbstractDataManager extends Observable implements DataManager<T> { @Override public List<T> getAll() throws SyncFailedException { if (syncFailedException != null) throw syncFailedException; if (syncStatus != SYNCED) throw new IllegalStateException("Sync not completed"); logger().info("Number items synct: " + this.allCa...
AbstractDataManager extends Observable implements DataManager<T> { @Override public List<T> getAll() throws SyncFailedException { if (syncFailedException != null) throw syncFailedException; if (syncStatus != SYNCED) throw new IllegalStateException("Sync not completed"); logger().info("Number items synct: " + this.allCa...
AbstractDataManager extends Observable implements DataManager<T> { @Override public List<T> getAll() throws SyncFailedException { if (syncFailedException != null) throw syncFailedException; if (syncStatus != SYNCED) throw new IllegalStateException("Sync not completed"); logger().info("Number items synct: " + this.allCa...
@Test public void createSuccess() { String accessId = "accessID"; String bankName = "bankName"; String bankCode = "bankCode"; String bankLogin = "bankLogin"; BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setBankName(bankName); bankAccessBankingModel.setBankCode(ban...
public BankAccess createBankAccess(BankAccessBankingModel bankingModel) { BankAccess bankAccess = new BankAccess(bankingModel.getId(), bankingModel.getBankName(), bankingModel.getBankCode(), bankingModel.getBankLogin()); return bankAccess; }
BankAccessFactory { public BankAccess createBankAccess(BankAccessBankingModel bankingModel) { BankAccess bankAccess = new BankAccess(bankingModel.getId(), bankingModel.getBankName(), bankingModel.getBankCode(), bankingModel.getBankLogin()); return bankAccess; } }
BankAccessFactory { public BankAccess createBankAccess(BankAccessBankingModel bankingModel) { BankAccess bankAccess = new BankAccess(bankingModel.getId(), bankingModel.getBankName(), bankingModel.getBankCode(), bankingModel.getBankLogin()); return bankAccess; } }
BankAccessFactory { public BankAccess createBankAccess(BankAccessBankingModel bankingModel) { BankAccess bankAccess = new BankAccess(bankingModel.getId(), bankingModel.getBankName(), bankingModel.getBankCode(), bankingModel.getBankLogin()); return bankAccess; } BankAccess createBankAccess(BankAccessBankingModel bankin...
BankAccessFactory { public BankAccess createBankAccess(BankAccessBankingModel bankingModel) { BankAccess bankAccess = new BankAccess(bankingModel.getId(), bankingModel.getBankName(), bankingModel.getBankCode(), bankingModel.getBankLogin()); return bankAccess; } BankAccess createBankAccess(BankAccessBankingModel bankin...
@Test public void createListSuccess() { String accessId = "accessID"; String bankName = "bankName"; String bankCode = "bankCode"; String bankLogin = "bankLogin"; BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setBankName(bankName); bankAccessBankingModel.setBankCode...
public List<BankAccess> createBankAccesses(List<BankAccessBankingModel> bankingModelList) { List<BankAccess> bankAccessesResult = new ArrayList<BankAccess>(); for (BankAccessBankingModel bankingModel : bankingModelList) { bankAccessesResult.add(this.createBankAccess(bankingModel)); } return bankAccessesResult; }
BankAccessFactory { public List<BankAccess> createBankAccesses(List<BankAccessBankingModel> bankingModelList) { List<BankAccess> bankAccessesResult = new ArrayList<BankAccess>(); for (BankAccessBankingModel bankingModel : bankingModelList) { bankAccessesResult.add(this.createBankAccess(bankingModel)); } return bankAcce...
BankAccessFactory { public List<BankAccess> createBankAccesses(List<BankAccessBankingModel> bankingModelList) { List<BankAccess> bankAccessesResult = new ArrayList<BankAccess>(); for (BankAccessBankingModel bankingModel : bankingModelList) { bankAccessesResult.add(this.createBankAccess(bankingModel)); } return bankAcce...
BankAccessFactory { public List<BankAccess> createBankAccesses(List<BankAccessBankingModel> bankingModelList) { List<BankAccess> bankAccessesResult = new ArrayList<BankAccess>(); for (BankAccessBankingModel bankingModel : bankingModelList) { bankAccessesResult.add(this.createBankAccess(bankingModel)); } return bankAcce...
BankAccessFactory { public List<BankAccess> createBankAccesses(List<BankAccessBankingModel> bankingModelList) { List<BankAccess> bankAccessesResult = new ArrayList<BankAccess>(); for (BankAccessBankingModel bankingModel : bankingModelList) { bankAccessesResult.add(this.createBankAccess(bankingModel)); } return bankAcce...
@Test public void transformSavingAccountIntoEntity() { SavingsAccount savingsAccount = new SavingsAccount(savingsAccountId, savingsAccountName, savingsAccountGoal, savingsAccountCurrent, savingsAccountFinalDate, savingsAccountfinalGoalFinishedDate); User currentUser = new User(userEmail, userFirstName, userLastName); S...
public SavingsAccountEntity transformSavingAccountIntoEntity(SavingsAccount savingsAccount, User currentUser) { SavingsAccountEntity savingsAccountEntity = new SavingsAccountEntity( savingsAccount.getName(), savingsAccount.getGoalbalance(), savingsAccount.getCurrentbalance(), savingsAccount.getFinalGoalFinishedDate(), ...
SavingsAccountIntoEntityTransformer { public SavingsAccountEntity transformSavingAccountIntoEntity(SavingsAccount savingsAccount, User currentUser) { SavingsAccountEntity savingsAccountEntity = new SavingsAccountEntity( savingsAccount.getName(), savingsAccount.getGoalbalance(), savingsAccount.getCurrentbalance(), savin...
SavingsAccountIntoEntityTransformer { public SavingsAccountEntity transformSavingAccountIntoEntity(SavingsAccount savingsAccount, User currentUser) { SavingsAccountEntity savingsAccountEntity = new SavingsAccountEntity( savingsAccount.getName(), savingsAccount.getGoalbalance(), savingsAccount.getCurrentbalance(), savin...
SavingsAccountIntoEntityTransformer { public SavingsAccountEntity transformSavingAccountIntoEntity(SavingsAccount savingsAccount, User currentUser) { SavingsAccountEntity savingsAccountEntity = new SavingsAccountEntity( savingsAccount.getName(), savingsAccount.getGoalbalance(), savingsAccount.getCurrentbalance(), savin...
SavingsAccountIntoEntityTransformer { public SavingsAccountEntity transformSavingAccountIntoEntity(SavingsAccount savingsAccount, User currentUser) { SavingsAccountEntity savingsAccountEntity = new SavingsAccountEntity( savingsAccount.getName(), savingsAccount.getGoalbalance(), savingsAccount.getCurrentbalance(), savin...
@Test public void transformContactIntoEntity() { Contact contact = new Contact(userEmail, userFirstName, userLastName); User result = transformer.transformContactIntoEntity(contact); assertNotNull(result); assertEquals(userEmail, result.getEmail()); assertEquals(userFirstName, result.getFirstName()); assertEquals(userL...
public User transformContactIntoEntity(Contact contact) { return new User(contact.getEmail(), contact.getFirstName(), contact.getLastName()); }
SavingsAccountIntoEntityTransformer { public User transformContactIntoEntity(Contact contact) { return new User(contact.getEmail(), contact.getFirstName(), contact.getLastName()); } }
SavingsAccountIntoEntityTransformer { public User transformContactIntoEntity(Contact contact) { return new User(contact.getEmail(), contact.getFirstName(), contact.getLastName()); } }
SavingsAccountIntoEntityTransformer { public User transformContactIntoEntity(Contact contact) { return new User(contact.getEmail(), contact.getFirstName(), contact.getLastName()); } SavingsAccountEntity transformSavingAccountIntoEntity(SavingsAccount savingsAccount, User currentUser); User transformContactIntoEntity(C...
SavingsAccountIntoEntityTransformer { public User transformContactIntoEntity(Contact contact) { return new User(contact.getEmail(), contact.getFirstName(), contact.getLastName()); } SavingsAccountEntity transformSavingAccountIntoEntity(SavingsAccount savingsAccount, User currentUser); User transformContactIntoEntity(C...
@Test public void transformBankAccountIdentifierListIntoEntity() { List<BankAccountIdentifier> identifiers = new ArrayList<>(); BankAccountIdentifier accountIdentifier = new BankAccountIdentifier(accessId, accountId); identifiers.add(accountIdentifier); List<BankAccountIdentifierEntity> result = transformer.transformBa...
public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifierEntities; } for (BankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
@Test public void transformBankAccountIdentifierIntoEntityInputNull() { List<BankAccountIdentifier> identifiers = null; List<BankAccountIdentifierEntity> result = transformer.transformBankAccountIdentifierIntoEntity(identifiers); assertNotNull(result); }
public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifierEntities; } for (BankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
@Test public void transformBankAccountIdentifierIntoEntity() { BankAccountIdentifier accountIdentifier = new BankAccountIdentifier(accessId, accountId); BankAccountIdentifierEntity result = transformer.transformBankAccountIdentifierIntoEntity(accountIdentifier); assertNotNull(result); assertEquals(result.getAccessid(),...
public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifierEntities; } for (BankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
SavingsAccountIntoEntityTransformer { public List<BankAccountIdentifierEntity> transformBankAccountIdentifierIntoEntity(List<BankAccountIdentifier> assignedBankAccounts) { List<BankAccountIdentifierEntity> bankAccountIdentifierEntities = new ArrayList<>(); if (assignedBankAccounts == null) { return bankAccountIdentifie...
@Test public void transformSavingsAccountSubGoalListIdentifierIntoEntity() { List<SavingsAccountSubGoal> subGoals = new ArrayList<SavingsAccountSubGoal>(); SavingsAccountSubGoal savingsAccountSubGoal = new SavingsAccountSubGoal(savingsAccountSubGoalTestName, savingsAccountSubGoalTestAmount); subGoals.add(savingsAccount...
public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (SavingsAccountSubGoal savingsAccountSu...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
@Test public void transformSavingsAccountSubGoalListIdentifierIntoEntityInputNull() { List<SavingsAccountSubGoal> subGoals = null; Set<SavingsAccountSubGoalEntity> result = transformer.transformSavingsAccountSubGoalIdentifierIntoEntity(subGoals); assertNotNull(result); }
public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (SavingsAccountSubGoal savingsAccountSu...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
@Test public void transformSavingsAccountSubGoalIdentifierIntoEntity() { SavingsAccountSubGoal savingsAccountSubGoal = new SavingsAccountSubGoal(savingsAccountSubGoalTestName, savingsAccountSubGoalTestAmount); SavingsAccountSubGoalEntity result = transformer.transformSavingsAccountSubGoalIdentifierIntoEntity(savingsAcc...
public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (SavingsAccountSubGoal savingsAccountSu...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
SavingsAccountIntoEntityTransformer { public Set<SavingsAccountSubGoalEntity> transformSavingsAccountSubGoalIdentifierIntoEntity(List<SavingsAccountSubGoal> subGoals) { Set<SavingsAccountSubGoalEntity> savingsAccountSubGoalEntities = new HashSet<>(); if (subGoals == null) { return savingsAccountSubGoalEntities; } for (...
@Test public void teste_filter_withEndDate_shouldReturnStay() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); Date start = sdf.parse("11/06/2017"); Date end = sdf.parse("11/07/2017"); Booking booking = new Booking(); booking.setDate(end); Transaction testTransaction = new Transaction("some...
@Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); @Override boolean shouldBeRem...
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); @Override boolean shouldBeRem...
@Test public void createTest() { BankAccessBankingModelFactory bankAccessBankingModelFactory = new BankAccessBankingModelFactory(); BankAccessCredential credential = new BankAccessCredential("test", "test", "test"); BankAccessBankingModel testModel = bankAccessBankingModelFactory.createBankAccessBankingModel("1", crede...
public BankAccessBankingModel createBankAccessBankingModel(String userId, BankAccessCredential bankAccessCredential) { BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setUserId(userId); bankAccessBankingModel.setBankCode(bankAccessCredential.getBankcode()); bankAcces...
BankAccessBankingModelFactory { public BankAccessBankingModel createBankAccessBankingModel(String userId, BankAccessCredential bankAccessCredential) { BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setUserId(userId); bankAccessBankingModel.setBankCode(bankAccessCred...
BankAccessBankingModelFactory { public BankAccessBankingModel createBankAccessBankingModel(String userId, BankAccessCredential bankAccessCredential) { BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setUserId(userId); bankAccessBankingModel.setBankCode(bankAccessCred...
BankAccessBankingModelFactory { public BankAccessBankingModel createBankAccessBankingModel(String userId, BankAccessCredential bankAccessCredential) { BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setUserId(userId); bankAccessBankingModel.setBankCode(bankAccessCred...
BankAccessBankingModelFactory { public BankAccessBankingModel createBankAccessBankingModel(String userId, BankAccessCredential bankAccessCredential) { BankAccessBankingModel bankAccessBankingModel = new BankAccessBankingModel(); bankAccessBankingModel.setUserId(userId); bankAccessBankingModel.setBankCode(bankAccessCred...
@Test public void transformSavingAccountsFromEntity() throws Exception { User currentUser = generateUserEntity(0); List<SavingsAccountEntity> savingsAccountEntityList = new ArrayList<>(); final int numberSavingAccounts = 3; for (int i = 0; i < numberSavingAccounts; i++) { SavingsAccountEntity savingsAccountEntity = gen...
public List<SavingsAccount> transformSavingAccountFromEntity(List<SavingsAccountEntity> savingsAccountEntityList, User currentUser) { List<SavingsAccount> savingsAccountList = new ArrayList<>(); for (SavingsAccountEntity savingsAccountEntity : savingsAccountEntityList) { savingsAccountList.add(transformSavingAccountFro...
SavingsAccountFromEntityTransformer { public List<SavingsAccount> transformSavingAccountFromEntity(List<SavingsAccountEntity> savingsAccountEntityList, User currentUser) { List<SavingsAccount> savingsAccountList = new ArrayList<>(); for (SavingsAccountEntity savingsAccountEntity : savingsAccountEntityList) { savingsAcc...
SavingsAccountFromEntityTransformer { public List<SavingsAccount> transformSavingAccountFromEntity(List<SavingsAccountEntity> savingsAccountEntityList, User currentUser) { List<SavingsAccount> savingsAccountList = new ArrayList<>(); for (SavingsAccountEntity savingsAccountEntity : savingsAccountEntityList) { savingsAcc...
SavingsAccountFromEntityTransformer { public List<SavingsAccount> transformSavingAccountFromEntity(List<SavingsAccountEntity> savingsAccountEntityList, User currentUser) { List<SavingsAccount> savingsAccountList = new ArrayList<>(); for (SavingsAccountEntity savingsAccountEntity : savingsAccountEntityList) { savingsAcc...
SavingsAccountFromEntityTransformer { public List<SavingsAccount> transformSavingAccountFromEntity(List<SavingsAccountEntity> savingsAccountEntityList, User currentUser) { List<SavingsAccount> savingsAccountList = new ArrayList<>(); for (SavingsAccountEntity savingsAccountEntity : savingsAccountEntityList) { savingsAcc...
@Test public void transformSavingAccountFromEntity() throws Exception { SavingsAccountEntity savingsAccountEntity = generateSavingAccountEntity(0); User currentUser = generateUserEntity(0); SavingsAccountFromEntityTransformer transformer = new SavingsAccountFromEntityTransformer(); SavingsAccount resultSavingAccount = ...
public List<SavingsAccount> transformSavingAccountFromEntity(List<SavingsAccountEntity> savingsAccountEntityList, User currentUser) { List<SavingsAccount> savingsAccountList = new ArrayList<>(); for (SavingsAccountEntity savingsAccountEntity : savingsAccountEntityList) { savingsAccountList.add(transformSavingAccountFro...
SavingsAccountFromEntityTransformer { public List<SavingsAccount> transformSavingAccountFromEntity(List<SavingsAccountEntity> savingsAccountEntityList, User currentUser) { List<SavingsAccount> savingsAccountList = new ArrayList<>(); for (SavingsAccountEntity savingsAccountEntity : savingsAccountEntityList) { savingsAcc...
SavingsAccountFromEntityTransformer { public List<SavingsAccount> transformSavingAccountFromEntity(List<SavingsAccountEntity> savingsAccountEntityList, User currentUser) { List<SavingsAccount> savingsAccountList = new ArrayList<>(); for (SavingsAccountEntity savingsAccountEntity : savingsAccountEntityList) { savingsAcc...
SavingsAccountFromEntityTransformer { public List<SavingsAccount> transformSavingAccountFromEntity(List<SavingsAccountEntity> savingsAccountEntityList, User currentUser) { List<SavingsAccount> savingsAccountList = new ArrayList<>(); for (SavingsAccountEntity savingsAccountEntity : savingsAccountEntityList) { savingsAcc...
SavingsAccountFromEntityTransformer { public List<SavingsAccount> transformSavingAccountFromEntity(List<SavingsAccountEntity> savingsAccountEntityList, User currentUser) { List<SavingsAccount> savingsAccountList = new ArrayList<>(); for (SavingsAccountEntity savingsAccountEntity : savingsAccountEntityList) { savingsAcc...
@Test public void transformContactsFromEntity() throws Exception { Set<SavingsAccountUserRelation> relationEntitySet = new HashSet<>(); final int numberOfUsers = 3; User mainUser = generateUserEntity(0); relationEntitySet.add(new SavingsAccountUserRelation(mainUser)); for (int i = 1; i < numberOfUsers; i++) { User user...
public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountUserRelation : savingsAccountUserRelati...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
@Test public void transformContactFromEntityInputNull() throws Exception { Set<SavingsAccountUserRelation> relationEntitySet = null; SavingsAccountFromEntityTransformer transformer = new SavingsAccountFromEntityTransformer(); List<Contact> resultContactList = transformer.transformContactFromEntity(relationEntitySet, nu...
public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountUserRelation : savingsAccountUserRelati...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
@Test public void transformContactFromEntity() throws Exception { User user = generateUserEntity(1); SavingsAccountFromEntityTransformer transformer = new SavingsAccountFromEntityTransformer(); Contact resultContact = transformer.transformContactFromEntity(user); Assert.assertNotNull(resultContact); Assert.assertEquals...
public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountUserRelation : savingsAccountUserRelati...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
SavingsAccountFromEntityTransformer { public List<Contact> transformContactFromEntity(Set<SavingsAccountUserRelation> savingsAccountUserRelations, User currentUser) { List<Contact> contacts = new ArrayList<>(); if (savingsAccountUserRelations == null) { return contacts; } for (SavingsAccountUserRelation savingsAccountU...
@Test public void transformBankAccountIdentifiersFromEntityEvaluateUser() throws Exception { Set<SavingsAccountUserRelation> relationEntityList = new HashSet<>(); List<BankAccountIdentifierEntity> identifierEntityList = new ArrayList<>(); final int numberIdentifiers = 3; User currentUser = generateUserEntity(0); for (i...
public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (SavingsAccountUserRelation userRelatio...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
@Test public void transformBankAccountIdentifiersFromEntity() throws Exception { List<BankAccountIdentifierEntity> identifierEntityList = new ArrayList<>(); final int numberIdentifiers = 3; for (int i = 0; i < numberIdentifiers; i++) { identifierEntityList.add(generateBankAccountIdentifier(i)); } SavingsAccountFromEnti...
public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (SavingsAccountUserRelation userRelatio...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
@Test public void transformBankAccountIdentifiersInputNull() throws Exception { List<BankAccountIdentifierEntity> identifierEntityList = null; SavingsAccountFromEntityTransformer transformer = new SavingsAccountFromEntityTransformer(); List<BankAccountIdentifier> resultIdentifierList = transformer.transformBankAccountI...
public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (SavingsAccountUserRelation userRelatio...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
@Test public void transformBankAccountIdentifierFromEntity() throws Exception { BankAccountIdentifierEntity identifierEntity = generateBankAccountIdentifier(1); SavingsAccountFromEntityTransformer transformer = new SavingsAccountFromEntityTransformer(); BankAccountIdentifier resultIdentifier = transformer.transformBank...
public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (SavingsAccountUserRelation userRelatio...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
SavingsAccountFromEntityTransformer { public List<BankAccountIdentifier> transformBankAccountIdentifierFromEntity(Set<SavingsAccountUserRelation> userRelations, User currentUser) { List<BankAccountIdentifier> bankAccountIdentifiers = new ArrayList<>(); if (userRelations == null) { return bankAccountIdentifiers; } for (...
@Test public void teste_filter_withStartDate_shouldReturnStay() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); Date start = sdf.parse("11/06/2017"); Date end = sdf.parse("11/07/2017"); Booking booking = new Booking(); booking.setDate(start); Transaction testTransaction = new Transaction("...
@Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); @Override boolean shouldBeRem...
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); @Override boolean shouldBeRem...
@Test public void transformSavingsAccountSubGoalIdentifiersFromEntity() throws Exception { Set<SavingsAccountSubGoalEntity> subGoalEntityList = new HashSet<>(); final int numberSubGoals = 3; for (int i = 0; i < numberSubGoals; i++) { SavingsAccountSubGoalEntity subGoalEntity = generateSubGoalEntity(i); subGoalEntityLis...
public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (SavingsAccountSubGoalEntity savingsAccoun...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
@Test public void transformSavingsAccountSubGoalIdentifiersFromEntityListNull() throws Exception { Set<SavingsAccountSubGoalEntity> subGoalEntitySet = null; SavingsAccountFromEntityTransformer transformer = new SavingsAccountFromEntityTransformer(); List<SavingsAccountSubGoal> resultSubGoalList = transformer.transformS...
public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (SavingsAccountSubGoalEntity savingsAccoun...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
@Test public void transformSavingsAccountSubGoalIdentifierFromEntity() throws Exception { SavingsAccountSubGoalEntity subGoalEntity = generateSubGoalEntity(1); SavingsAccountFromEntityTransformer transformer = new SavingsAccountFromEntityTransformer(); SavingsAccountSubGoal resultSubGoal = transformer.transformSavingsA...
public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (SavingsAccountSubGoalEntity savingsAccoun...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
SavingsAccountFromEntityTransformer { public List<SavingsAccountSubGoal> transformSavingsAccountSubGoalIdentifierFromEntity(Set<SavingsAccountSubGoalEntity> subGoalEntities) { List<SavingsAccountSubGoal> savingsAccountSubGoals = new ArrayList<>(); if (subGoalEntities == null) { return savingsAccountSubGoals; } for (Sav...
@Test public void createSuccess() { final double testAmount = 123.22; BankAccountBalanceBankingModel bankAccountBalanceBankingModel = new BankAccountBalanceBankingModel(); bankAccountBalanceBankingModel.setReadyHbciBalance(testAmount); String accessId = "accessID"; String accountId = "accountId"; String type = "type"; ...
public BankAccount createBankAccount(BankAccountBankingModel bankingModel) { double balance = 0; if (bankingModel.getBankAccountBalance() != null) { balance = bankingModel.getBankAccountBalance().getReadyHbciBalance(); } BankAccount bankAccount = new BankAccount(bankingModel.getId(), bankingModel.getType() != null ? ba...
BankAccountFactory { public BankAccount createBankAccount(BankAccountBankingModel bankingModel) { double balance = 0; if (bankingModel.getBankAccountBalance() != null) { balance = bankingModel.getBankAccountBalance().getReadyHbciBalance(); } BankAccount bankAccount = new BankAccount(bankingModel.getId(), bankingModel.g...
BankAccountFactory { public BankAccount createBankAccount(BankAccountBankingModel bankingModel) { double balance = 0; if (bankingModel.getBankAccountBalance() != null) { balance = bankingModel.getBankAccountBalance().getReadyHbciBalance(); } BankAccount bankAccount = new BankAccount(bankingModel.getId(), bankingModel.g...
BankAccountFactory { public BankAccount createBankAccount(BankAccountBankingModel bankingModel) { double balance = 0; if (bankingModel.getBankAccountBalance() != null) { balance = bankingModel.getBankAccountBalance().getReadyHbciBalance(); } BankAccount bankAccount = new BankAccount(bankingModel.getId(), bankingModel.g...
BankAccountFactory { public BankAccount createBankAccount(BankAccountBankingModel bankingModel) { double balance = 0; if (bankingModel.getBankAccountBalance() != null) { balance = bankingModel.getBankAccountBalance().getReadyHbciBalance(); } BankAccount bankAccount = new BankAccount(bankingModel.getId(), bankingModel.g...
@Test public void createListSuccess() { final double testAmount = 123.22; final int bankAccountActualSize = 1; BankAccountBalanceBankingModel bankAccountBalanceBankingModel = new BankAccountBalanceBankingModel(); bankAccountBalanceBankingModel.setReadyHbciBalance(testAmount); String accessId = "accessID"; String accoun...
public List<BankAccount> createBankAccounts(List<BankAccountBankingModel> bankingModelList) { List<BankAccount> bankAccountsResult = new ArrayList<BankAccount>(); for (BankAccountBankingModel bankingModel : bankingModelList) { bankAccountsResult.add(this.createBankAccount(bankingModel)); } return bankAccountsResult; }
BankAccountFactory { public List<BankAccount> createBankAccounts(List<BankAccountBankingModel> bankingModelList) { List<BankAccount> bankAccountsResult = new ArrayList<BankAccount>(); for (BankAccountBankingModel bankingModel : bankingModelList) { bankAccountsResult.add(this.createBankAccount(bankingModel)); } return b...
BankAccountFactory { public List<BankAccount> createBankAccounts(List<BankAccountBankingModel> bankingModelList) { List<BankAccount> bankAccountsResult = new ArrayList<BankAccount>(); for (BankAccountBankingModel bankingModel : bankingModelList) { bankAccountsResult.add(this.createBankAccount(bankingModel)); } return b...
BankAccountFactory { public List<BankAccount> createBankAccounts(List<BankAccountBankingModel> bankingModelList) { List<BankAccount> bankAccountsResult = new ArrayList<BankAccount>(); for (BankAccountBankingModel bankingModel : bankingModelList) { bankAccountsResult.add(this.createBankAccount(bankingModel)); } return b...
BankAccountFactory { public List<BankAccount> createBankAccounts(List<BankAccountBankingModel> bankingModelList) { List<BankAccount> bankAccountsResult = new ArrayList<BankAccount>(); for (BankAccountBankingModel bankingModel : bankingModelList) { bankAccountsResult.add(this.createBankAccount(bankingModel)); } return b...
@Test public void teste_filter_withDateBeforeStartDate_shouldReturnLeave() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); Date start = sdf.parse("11/06/2017"); Date end = sdf.parse("11/07/2017"); Date testDate = sdf.parse("11/04/2017"); Booking booking = new Booking(); booking.setDate(tes...
@Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); @Override boolean shouldBeRem...
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); @Override boolean shouldBeRem...
@Test public void teste_filter_withDateAfterEndDate_shouldReturnLeave() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); Date start = sdf.parse("11/06/2017"); Date end = sdf.parse("11/07/2017"); Date testDate = sdf.parse("11/08/2017"); Booking booking = new Booking(); booking.setDate(testDa...
@Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); }
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); @Override boolean shouldBeRem...
CustomFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { if(this.startDate.after(t.booking().getDate())){ return true; } if(this.endDate.before(t.booking().getDate())){ return true; } return false; } CustomFilter(Date startDate, Date endDate); @Override boolean shouldBeRem...
@Test public void teste_filter_withMatchingDay_shouldReturnStay() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); Date expectedDate = sdf.parse("11/07/2017"); Date bookingDate = sdf.parse("11/07/2017"); Booking booking = new Booking(); booking.setDate(bookingDate); Transaction testTransact...
@Override public boolean shouldBeRemoved(Transaction t) { return getZeroTimeDate(t.booking().getDate()).compareTo(this.day) != 0; }
OneDayFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { return getZeroTimeDate(t.booking().getDate()).compareTo(this.day) != 0; } }
OneDayFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { return getZeroTimeDate(t.booking().getDate()).compareTo(this.day) != 0; } OneDayFilter(Date day); }
OneDayFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { return getZeroTimeDate(t.booking().getDate()).compareTo(this.day) != 0; } OneDayFilter(Date day); @Override boolean shouldBeRemoved(Transaction t); }
OneDayFilter implements Filter<Transaction> { @Override public boolean shouldBeRemoved(Transaction t) { return getZeroTimeDate(t.booking().getDate()).compareTo(this.day) != 0; } OneDayFilter(Date day); @Override boolean shouldBeRemoved(Transaction t); }
@Test public void migrateAndClear_tokenFound() throws JSONException { when(mockStorageHelpers.getDigitsSessionJson()).thenReturn(VALID_DIGITS_SESSION); when(mockStorageHelpers.getUnsignedJWT(mjsonCaptor.capture())).thenReturn(DIGITS_JWT); when(mockFirebaseAuth.signInWithCustomToken(DIGITS_JWT)).thenReturn(authResultTas...
public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser != null) { Log...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
@Test public void migrateCustomSession() throws JSONException { when(mockStorageHelpers.getUnsignedJWT(mjsonCaptor.capture())).thenReturn(DIGITS_JWT); when(mockFirebaseAuth.signInWithCustomToken(DIGITS_JWT)).thenReturn(authResultTask); AuthMigrator authMigrator = new AuthMigrator(mockFirebaseApp, mockStorageHelpers, mo...
public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser != null) { Log...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
@Test public void hasLegacyAuth() throws JSONException { when(mockStorageHelpers.hasDigitsSession()).thenReturn(true); AuthMigrator authMigrator = new AuthMigrator(mockFirebaseApp, mockStorageHelpers, mockFirebaseAuth); assertTrue(authMigrator.hasLegacyAuth()); }
public boolean hasLegacyAuth() { return mStorageHelpers.hasDigitsSession(); }
AuthMigrator { public boolean hasLegacyAuth() { return mStorageHelpers.hasDigitsSession(); } }
AuthMigrator { public boolean hasLegacyAuth() { return mStorageHelpers.hasDigitsSession(); } @VisibleForTesting(otherwise = PRIVATE) AuthMigrator(@NonNull FirebaseApp app, @NonNull StorageHelpers storageHelper, @NonNull FirebaseAuth firebaseAuth); }
AuthMigrator { public boolean hasLegacyAuth() { return mStorageHelpers.hasDigitsSession(); } @VisibleForTesting(otherwise = PRIVATE) AuthMigrator(@NonNull FirebaseApp app, @NonNull StorageHelpers storageHelper, @NonNull FirebaseAuth firebaseAuth); static AuthMigrator getInstance(FirebaseApp app); stat...
AuthMigrator { public boolean hasLegacyAuth() { return mStorageHelpers.hasDigitsSession(); } @VisibleForTesting(otherwise = PRIVATE) AuthMigrator(@NonNull FirebaseApp app, @NonNull StorageHelpers storageHelper, @NonNull FirebaseAuth firebaseAuth); static AuthMigrator getInstance(FirebaseApp app); stat...
@Test public void clearLegacyAuth() throws JSONException { AuthMigrator authMigrator = new AuthMigrator(mockFirebaseApp, mockStorageHelpers, mockFirebaseAuth); authMigrator.clearLegacyAuth(); verify(mockStorageHelpers).clearDigitsSession(); }
public void clearLegacyAuth() { mStorageHelpers.clearDigitsSession(); }
AuthMigrator { public void clearLegacyAuth() { mStorageHelpers.clearDigitsSession(); } }
AuthMigrator { public void clearLegacyAuth() { mStorageHelpers.clearDigitsSession(); } @VisibleForTesting(otherwise = PRIVATE) AuthMigrator(@NonNull FirebaseApp app, @NonNull StorageHelpers storageHelper, @NonNull FirebaseAuth firebaseAuth); }
AuthMigrator { public void clearLegacyAuth() { mStorageHelpers.clearDigitsSession(); } @VisibleForTesting(otherwise = PRIVATE) AuthMigrator(@NonNull FirebaseApp app, @NonNull StorageHelpers storageHelper, @NonNull FirebaseAuth firebaseAuth); static AuthMigrator getInstance(FirebaseApp app); static Aut...
AuthMigrator { public void clearLegacyAuth() { mStorageHelpers.clearDigitsSession(); } @VisibleForTesting(otherwise = PRIVATE) AuthMigrator(@NonNull FirebaseApp app, @NonNull StorageHelpers storageHelper, @NonNull FirebaseAuth firebaseAuth); static AuthMigrator getInstance(FirebaseApp app); static Aut...
@Test(expected=JSONException.class) public void testInvalidFromDigitsSessionJson() throws JSONException { RedeemableDigitsSessionBuilder.fromSessionJson("invalid_json"); }
@NonNull static RedeemableDigitsSessionBuilder fromSessionJson(@NonNull String json) throws JSONException { RedeemableDigitsSessionBuilder builder = new RedeemableDigitsSessionBuilder(); JSONObject jsonObject = new JSONObject(json); JSONObject emailJsonObject = safeGetJsonObject(EMAIL_KEY, jsonObject); JSONObject authT...
RedeemableDigitsSessionBuilder { @NonNull static RedeemableDigitsSessionBuilder fromSessionJson(@NonNull String json) throws JSONException { RedeemableDigitsSessionBuilder builder = new RedeemableDigitsSessionBuilder(); JSONObject jsonObject = new JSONObject(json); JSONObject emailJsonObject = safeGetJsonObject(EMAIL_K...
RedeemableDigitsSessionBuilder { @NonNull static RedeemableDigitsSessionBuilder fromSessionJson(@NonNull String json) throws JSONException { RedeemableDigitsSessionBuilder builder = new RedeemableDigitsSessionBuilder(); JSONObject jsonObject = new JSONObject(json); JSONObject emailJsonObject = safeGetJsonObject(EMAIL_K...
RedeemableDigitsSessionBuilder { @NonNull static RedeemableDigitsSessionBuilder fromSessionJson(@NonNull String json) throws JSONException { RedeemableDigitsSessionBuilder builder = new RedeemableDigitsSessionBuilder(); JSONObject jsonObject = new JSONObject(json); JSONObject emailJsonObject = safeGetJsonObject(EMAIL_K...
RedeemableDigitsSessionBuilder { @NonNull static RedeemableDigitsSessionBuilder fromSessionJson(@NonNull String json) throws JSONException { RedeemableDigitsSessionBuilder builder = new RedeemableDigitsSessionBuilder(); JSONObject jsonObject = new JSONObject(json); JSONObject emailJsonObject = safeGetJsonObject(EMAIL_K...