Merge pull request #520 from GetStream/feat/connectionLessClient

feat!: connection less client [CDS-335]
This commit is contained in:
Salvatore Giordano
2021-07-08 10:38:07 +02:00
committed by GitHub
6 changed files with 261 additions and 44 deletions
@@ -204,7 +204,8 @@ void main() {
final event = Event(type: EventType.any);
when(() => mockClient.on()).thenAnswer((_) => Stream.value(event));
when(() => mockClient.openConnection()).thenAnswer((_) async => event);
when(() => mockClient.openConnection())
.thenAnswer((_) async => OwnUser(id: 'test'));
when(() => mockClient.closeConnection()).thenAnswer((_) async => null);
when(() => mockClient.wsConnectionStatus)
.thenReturn(ConnectionStatus.disconnected);
@@ -238,7 +239,8 @@ void main() {
final event = Event();
when(() => mockClient.on()).thenAnswer((_) => Stream.value(event));
when(() => mockClient.openConnection()).thenAnswer((_) async => event);
when(() => mockClient.openConnection())
.thenAnswer((_) async => OwnUser(id: 'test'));
when(() => mockClient.closeConnection()).thenAnswer((_) async => null);
when(() => mockClient.wsConnectionStatus)
.thenReturn(ConnectionStatus.disconnected);
@@ -327,7 +329,8 @@ void main() {
final event = Event();
when(() => mockClient.on()).thenAnswer((_) => Stream.value(event));
when(() => mockClient.openConnection()).thenAnswer((_) async => event);
when(() => mockClient.openConnection())
.thenAnswer((_) async => OwnUser(id: 'test'));
when(() => mockClient.closeConnection()).thenAnswer((_) async => null);
when(() => mockClient.wsConnectionStatus)
.thenReturn(ConnectionStatus.disconnected);
@@ -376,7 +379,8 @@ void main() {
final event = Event();
when(() => mockClient.on()).thenAnswer((_) => Stream.value(event));
when(() => mockClient.openConnection()).thenAnswer((_) async => event);
when(() => mockClient.openConnection())
.thenAnswer((_) async => OwnUser(id: 'test'));
when(() => mockClient.closeConnection()).thenAnswer((_) async => null);
when(() => mockClient.wsConnectionStatus)
.thenReturn(ConnectionStatus.connected);
@@ -402,7 +406,8 @@ void main() {
final event = Event();
when(() => mockClient.on()).thenAnswer((_) => Stream.value(event));
when(() => mockClient.openConnection()).thenAnswer((_) async => event);
when(() => mockClient.openConnection())
.thenAnswer((_) async => OwnUser(id: 'test'));
when(() => mockClient.closeConnection()).thenAnswer((_) async => null);
when(() => mockClient.wsConnectionStatus)
.thenReturn(ConnectionStatus.disconnected);