Initial commit.

This commit is contained in:
FireMasterK 2022-02-06 12:22:59 +00:00
commit d0203d7c63
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD
39 changed files with 2880 additions and 0 deletions

View file

@ -0,0 +1,64 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
// tests for ChannelInfo
void main() {
final instance = ChannelInfoBuilder();
// TODO add properties to the builder and call build()
group(ChannelInfo, () {
// The URL of the channel's avatar.
// String avatarUrl
test('to test the property `avatarUrl`', () async {
// TODO
});
// The URL of the channel's banner.
// String bannerUrl
test('to test the property `bannerUrl`', () async {
// TODO
});
// The channel's description.
// String description
test('to test the property `description`', () async {
// TODO
});
// The ID of the channel.
// String id
test('to test the property `id`', () async {
// TODO
});
// The name of the channel.
// String name
test('to test the property `name`', () async {
// TODO
});
// The parameter used to get the next page of related videos.
// String nextpage
test('to test the property `nextpage`', () async {
// TODO
});
// BuiltList<StreamItem> relatedStreams
test('to test the property `relatedStreams`', () async {
// TODO
});
// The number of subscribers the channel has.
// int subscriberCount
test('to test the property `subscriberCount`', () async {
// TODO
});
// Whether the channel is verified.
// bool verified
test('to test the property `verified`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,23 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
// tests for ExceptionError
void main() {
final instance = ExceptionErrorBuilder();
// TODO add properties to the builder and call build()
group(ExceptionError, () {
// The stacktrace provided by the server.
// String error
test('to test the property `error`', () async {
// TODO
});
// The error message from the stacktrace.
// String message
test('to test the property `message`', () async {
// TODO
});
});
}

9
test/regions_test.dart Normal file
View file

@ -0,0 +1,9 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
// tests for Regions
void main() {
group(Regions, () {
});
}

View file

@ -0,0 +1,71 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
// tests for StreamItem
void main() {
final instance = StreamItemBuilder();
// TODO add properties to the builder and call build()
group(StreamItem, () {
// The duration of the video in seconds.
// int duration
test('to test the property `duration`', () async {
// TODO
});
// The thumbnail of the video.
// String thumbnail
test('to test the property `thumbnail`', () async {
// TODO
});
// The title of the video.
// String title
test('to test the property `title`', () async {
// TODO
});
// The relative date the video was uploaded on.
// String uploadedDate
test('to test the property `uploadedDate`', () async {
// TODO
});
// The avatar of the channel of the video.
// String uploaderAvatar
test('to test the property `uploaderAvatar`', () async {
// TODO
});
// The name of the channel of the video.
// String uploaderName
test('to test the property `uploaderName`', () async {
// TODO
});
// The relative URL of the channel of the video.
// String uploaderUrl
test('to test the property `uploaderUrl`', () async {
// TODO
});
// Whether or not the channel has a verified badge.
// bool uploaderVerified
test('to test the property `uploaderVerified`', () async {
// TODO
});
// The relative URL to the video.
// String url
test('to test the property `url`', () async {
// TODO
});
// The number of views the video has.
// int views
test('to test the property `views`', () async {
// TODO
});
});
}

86
test/stream_test.dart Normal file
View file

@ -0,0 +1,86 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
// tests for Stream
void main() {
final instance = StreamBuilder();
// TODO add properties to the builder and call build()
group(Stream, () {
// The URL of the stream.
// String url
test('to test the property `url`', () async {
// TODO
});
// The format of the stream.
// String format
test('to test the property `format`', () async {
// TODO
});
// The quality of the stream.
// String quality
test('to test the property `quality`', () async {
// TODO
});
// The mime type of the stream.
// String mimeType
test('to test the property `mimeType`', () async {
// TODO
});
// The codec of the stream.
// String codec
test('to test the property `codec`', () async {
// TODO
});
// bool videoOnly
test('to test the property `videoOnly`', () async {
// TODO
});
// int bitrate
test('to test the property `bitrate`', () async {
// TODO
});
// int initStart
test('to test the property `initStart`', () async {
// TODO
});
// int initEnd
test('to test the property `initEnd`', () async {
// TODO
});
// int indexStart
test('to test the property `indexStart`', () async {
// TODO
});
// int indexEnd
test('to test the property `indexEnd`', () async {
// TODO
});
// int width
test('to test the property `width`', () async {
// TODO
});
// int height
test('to test the property `height`', () async {
// TODO
});
// int fps
test('to test the property `fps`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,56 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
/// tests for UnauthenticatedApi
void main() {
final instance = PipedApi().getUnauthenticatedApi();
group(UnauthenticatedApi, () {
// Gets Channel Information
//
// Gets all available Channel information about a channel.
//
//Future<ChannelInfo> channelInfoId(String channelId) async
test('test channelInfoId', () async {
// TODO
});
// Gets Channel Information
//
// Gets all available Channel information about a channel.
//
//Future<ChannelInfo> channelInfoName(String name) async
test('test channelInfoName', () async {
// TODO
});
// Gets Channel Information
//
// Gets all available Channel information about a channel.
//
//Future<ChannelInfo> channelInfoUsername(String username) async
test('test channelInfoUsername', () async {
// TODO
});
// Gets Video Information
//
// Gets all available Stream information about a video.
//
//Future<VideoInfo> streamInfo(String videoId) async
test('test streamInfo', () async {
// TODO
});
// Gets all Trending Videos
//
// Gets all Trending Videos in the requested country.
//
//Future<BuiltList<StreamItem>> trending(Regions region) async
test('test trending', () async {
// TODO
});
});
}

21
test/video_info_test.dart Normal file
View file

@ -0,0 +1,21 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
// tests for VideoInfo
void main() {
final instance = VideoInfoBuilder();
// TODO add properties to the builder and call build()
group(VideoInfo, () {
// BuiltList<Stream> audioStreams
test('to test the property `audioStreams`', () async {
// TODO
});
// BuiltList<StreamItem> relatedStreams
test('to test the property `relatedStreams`', () async {
// TODO
});
});
}