diff options
author | Alex Clayton <alex.clayton@isode.com> | 2016-02-08 12:30:12 (GMT) |
---|---|---|
committer | Alex Clayton <alex.clayton@isode.com> | 2016-02-16 11:02:39 (GMT) |
commit | 2ebf488dfee7156fbbe0b3d3eccebe13d86a8634 (patch) | |
tree | 8f0c873e2048e9f3a5bca51f358f60b21e690dd2 /src/com/isode/stroke/base | |
parent | 810abab2eb236c68c75025e383609d952af71e4f (diff) | |
download | stroke-2ebf488dfee7156fbbe0b3d3eccebe13d86a8634.zip stroke-2ebf488dfee7156fbbe0b3d3eccebe13d86a8634.tar.bz2 |
Add the FileTransfer tests
Add the missing FileTransfer tests to stroke. When porting the tests
I found some of them were failing and required changes to the classes
being tested to fix. Had to add a DummyNetworkEnvironment as well for
the OutgoingJingleFileTransferTest.
Test-information:
All unit tests pass.
Change-Id: Id511a556ef3a5d66e0e107f36f736db3bbb3a437
Diffstat (limited to 'src/com/isode/stroke/base')
-rw-r--r-- | src/com/isode/stroke/base/ByteArray.java | 10 | ||||
-rw-r--r-- | src/com/isode/stroke/base/SafeByteArray.java | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/com/isode/stroke/base/ByteArray.java b/src/com/isode/stroke/base/ByteArray.java index 997cc6e..f1181f5 100644 --- a/src/com/isode/stroke/base/ByteArray.java +++ b/src/com/isode/stroke/base/ByteArray.java @@ -3,7 +3,7 @@ * All rights reserved. */ /* - * Copyright (c) 2010-2015, Isode Limited, London, England. + * Copyright (c) 2010-2016, Isode Limited, London, England. * All rights reserved. */ package com.isode.stroke.base; @@ -61,6 +61,14 @@ public class ByteArray { public ByteArray(ByteArray b) { append(b); } + + /** + * Constructs a new {@link ByteArray} containing the user supplied byte. + * @param b a byte. + */ + public ByteArray(byte b) { + append(b); + } /*public ByteArray(char[] c, int n) { for (int i = 0; i < n; i++) { diff --git a/src/com/isode/stroke/base/SafeByteArray.java b/src/com/isode/stroke/base/SafeByteArray.java index 437346f..f07cbe1 100644 --- a/src/com/isode/stroke/base/SafeByteArray.java +++ b/src/com/isode/stroke/base/SafeByteArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015, Isode Limited, London, England. + * Copyright (c) 2011-2016, Isode Limited, London, England. * All rights reserved. */ package com.isode.stroke.base; @@ -34,6 +34,14 @@ public class SafeByteArray extends ByteArray { public SafeByteArray(byte[] c) { super(c); } + + /** + * Constructs a new {@link SafeByteArray} containing the user supplied byte. + * @param b a byte. + */ + public SafeByteArray(byte b) { + super(b); + } /** * Creates a new SafeByteArray object containing all |