You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.1 KiB
Java
52 lines
1.1 KiB
Java
package com.htfp.weather.download;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import java.util.List;
|
|
|
|
import static org.junit.jupiter.api.Assertions.*;
|
|
|
|
/**
|
|
* @Author : shiyi
|
|
* @Date : 2024/4/25 16:15
|
|
* @Description :
|
|
*/
|
|
class GfsDownloaderTest {
|
|
|
|
public static GfsDataConfig gfsDataConfig = new GfsDataConfig();
|
|
static {
|
|
gfsDataConfig.readConfig();
|
|
}
|
|
GfsDownloader gfsDownloader = new GfsDownloader(gfsDataConfig);
|
|
|
|
|
|
@Test
|
|
void iniTimeSetting() {
|
|
gfsDownloader.iniTimeSetting();
|
|
}
|
|
|
|
@Test
|
|
void download() {
|
|
gfsDownloader.iniTimeSetting();
|
|
List<FileInfo> fileInfoList = gfsDownloader.getFilesInfo();
|
|
gfsDownloader.download(fileInfoList.get(0));
|
|
}
|
|
|
|
@Test
|
|
void downloadAll() {
|
|
gfsDownloader.iniTimeSetting();
|
|
List<FileInfo> fileInfoList = gfsDownloader.getFilesInfo();
|
|
gfsDownloader.downloadAll(fileInfoList);
|
|
|
|
}
|
|
|
|
@Test
|
|
void getFilesInfo() {
|
|
gfsDownloader.iniTimeSetting();
|
|
List<FileInfo> fileInfoList = gfsDownloader.getFilesInfo();
|
|
for (FileInfo fileInfo :fileInfoList) {
|
|
System.out.println(fileInfo);
|
|
}
|
|
}
|
|
|
|
} |