-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add unit test for cred provider
- Loading branch information
1 parent
27ccd27
commit 9fbb954
Showing
5 changed files
with
98 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
// TODO: Put public facing types in this file. | ||
|
||
import '../generated/cachepubsub.pb.dart'; | ||
import 'package:grpc/grpc.dart'; | ||
|
||
abstract class ITopicClient { | ||
void publish(); | ||
} | ||
|
||
class TopicClient implements ITopicClient { | ||
ClientChannel _channel; | ||
TopicClient() { | ||
_channel = ClientChannel(host) | ||
} | ||
@override | ||
void publish() { | ||
// TODO: implement publish | ||
} | ||
|
||
void close() { | ||
|
||
} | ||
} | ||
|
||
/// Checks if you are awesome. Spoiler: you are. | ||
class Awesome { | ||
bool get isAwesome => true; | ||
} | ||
|
||
PubsubApi api = PubsubApi(); | ||
// // TODO: Put public facing types in this file. | ||
// | ||
// import '../generated/cachepubsub.pb.dart'; | ||
// import 'package:grpc/grpc.dart'; | ||
// | ||
// abstract class ITopicClient { | ||
// void publish(); | ||
// } | ||
// | ||
// class TopicClient implements ITopicClient { | ||
// ClientChannel _channel; | ||
// | ||
// TopicClient() { | ||
// _channel = ClientChannel(host) | ||
// } | ||
// @override | ||
// void publish() { | ||
// // TODO: implement publish | ||
// } | ||
// | ||
// void close() { | ||
// | ||
// } | ||
// } | ||
// | ||
// /// Checks if you are awesome. Spoiler: you are. | ||
// class Awesome { | ||
// bool get isAwesome => true; | ||
// } | ||
// | ||
// PubsubApi api = PubsubApi(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,44 @@ | ||
// TODO: Put public facing types in this file. | ||
|
||
import 'dart:typed_data'; | ||
|
||
import '../generated/cachepubsub.pb.dart'; | ||
import 'package:grpc/grpc.dart'; | ||
|
||
sealed class Value {} | ||
class StringValue implements Value { | ||
String _value; | ||
StringValue(String v) : _value = v; | ||
String get value => _value; | ||
} | ||
|
||
class BinaryValue implements Value { | ||
Uint8List _value; | ||
BinaryValue(Uint8List v) : _value = v; | ||
Uint8List get value => _value; | ||
} | ||
|
||
abstract class ITopicClient { | ||
void publish(String cacheName, String topicName, Value value); | ||
} | ||
|
||
class TopicClient implements ITopicClient { | ||
ClientChannel _channel; | ||
|
||
TopicClient() { | ||
_channel = ClientChannel(host) | ||
} | ||
@override | ||
void publish() { | ||
// TODO: implement publish | ||
} | ||
|
||
void close() { | ||
|
||
} | ||
} | ||
|
||
/// Checks if you are awesome. Spoiler: you are. | ||
class Awesome { | ||
bool get isAwesome => true; | ||
} | ||
|
||
PubsubApi api = PubsubApi(); | ||
// // TODO: Put public facing types in this file. | ||
// | ||
// import 'dart:typed_data'; | ||
// | ||
// import '../generated/cachepubsub.pb.dart'; | ||
// import 'package:grpc/grpc.dart'; | ||
// | ||
// sealed class Value {} | ||
// class StringValue implements Value { | ||
// String _value; | ||
// StringValue(String v) : _value = v; | ||
// String get value => _value; | ||
// } | ||
// | ||
// class BinaryValue implements Value { | ||
// Uint8List _value; | ||
// BinaryValue(Uint8List v) : _value = v; | ||
// Uint8List get value => _value; | ||
// } | ||
// | ||
// abstract class ITopicClient { | ||
// void publish(String cacheName, String topicName, Value value); | ||
// } | ||
// | ||
// class TopicClient implements ITopicClient { | ||
// ClientChannel _channel; | ||
// | ||
// TopicClient() { | ||
// _channel = ClientChannel(host) | ||
// } | ||
// @override | ||
// void publish() { | ||
// // TODO: implement publish | ||
// } | ||
// | ||
// void close() { | ||
// | ||
// } | ||
// } | ||
// | ||
// /// Checks if you are awesome. Spoiler: you are. | ||
// class Awesome { | ||
// bool get isAwesome => true; | ||
// } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import 'package:client_sdk_dart/client_sdk_dart.dart'; | ||
import 'package:client_sdk_dart/src/auth/credential_provider.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
group('credential_provider', () { | ||
setUp(() { | ||
// Additional setup goes here. | ||
}); | ||
|
||
group("CredentialProvider.fromString", () => { | ||
test('Test reading credentials from a string', () => { | ||
CredentialProvider.fromString("") | ||
}) | ||
}); | ||
}); | ||
} |