1 |
c9ac14ff
|
Eliška Mourycová
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
2 |
|
|
using ServerApp.DataDownload;
|
3 |
|
|
using System;
|
4 |
|
|
using System.Collections.Generic;
|
5 |
|
|
using System.IO;
|
6 |
|
|
using System.Linq;
|
7 |
|
|
using System.Text;
|
8 |
|
|
using System.Threading.Tasks;
|
9 |
|
|
|
10 |
|
|
namespace ServerAppFunctionalTests.DownloaderTests
|
11 |
|
|
{
|
12 |
|
|
[TestClass]
|
13 |
|
|
public class DataDownloaderTesting
|
14 |
|
|
{
|
15 |
|
|
static DataDownloader dd;
|
16 |
|
|
[ClassInitialize]
|
17 |
|
|
public static void SetUpClass(TestContext context)
|
18 |
|
|
{
|
19 |
|
|
dd = new DataDownloader("./testDD", "http://openstore.zcu.cz/", "OD_ZCU_{type}_{month}_{year}_{format}.zip", "http://wttr.in/Plzen,czechia?format=j1"); ;
|
20 |
|
|
}
|
21 |
|
|
|
22 |
|
|
[TestMethod]
|
23 |
|
|
public void DirectoryCreated()
|
24 |
|
|
{
|
25 |
|
|
dd = new DataDownloader("./testDD", "http://openstore.zcu.cz/", "OD_ZCU_{type}_{month}_{year}_{format}.zip", "http://wttr.in/Plzen,czechia?format=j1");
|
26 |
|
|
bool rootDirExists = Directory.Exists(dd.RootDataDirectory);
|
27 |
|
|
Assert.IsTrue(rootDirExists);
|
28 |
|
|
}
|
29 |
|
|
|
30 |
|
|
[TestMethod]
|
31 |
|
|
public void DataSubdirectoriesCreated()
|
32 |
|
|
{
|
33 |
|
|
|
34 |
|
|
}
|
35 |
|
|
|
36 |
|
|
[TestMethod]
|
37 |
|
|
public void DataDownload()
|
38 |
|
|
{
|
39 |
|
|
|
40 |
|
|
}
|
41 |
|
|
|
42 |
|
|
[TestMethod]
|
43 |
|
|
public void DataRetrieve()
|
44 |
|
|
{
|
45 |
|
|
|
46 |
|
|
}
|
47 |
|
|
|
48 |
|
|
[TestMethod]
|
49 |
|
|
public void DateCompare()
|
50 |
|
|
{
|
51 |
|
|
|
52 |
|
|
}
|
53 |
|
|
}
|
54 |
|
|
}
|