mirror of
https://github.com/besterprotocol/bformat
synced 2023-12-13 21:30:24 +01:00
Client
- Added a `close()` method - Call `close()` on the `BClient` at the end of the unit test
This commit is contained in:
parent
d9f34fbac4
commit
afab414d01
|
@ -145,6 +145,14 @@ public class BClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Closes the client
|
||||||
|
*/
|
||||||
|
public void close()
|
||||||
|
{
|
||||||
|
/* Close the underlying stream */
|
||||||
|
stream.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
version(unittest)
|
version(unittest)
|
||||||
|
@ -206,4 +214,6 @@ unittest
|
||||||
assert(receivedMessage == "ABBA");
|
assert(receivedMessage == "ABBA");
|
||||||
writeln(receivedMessage);
|
writeln(receivedMessage);
|
||||||
writeln(cast(string)receivedMessage);
|
writeln(cast(string)receivedMessage);
|
||||||
|
|
||||||
|
bClient.close();
|
||||||
}
|
}
|
Loading…
Reference in a new issue