1 |
cf35739b
|
Eliška Mourycová
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
2 |
|
|
using ServerApp.User;
|
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 |
|
|
using ServerApp.DataDownload;
|
10 |
|
|
|
11 |
|
|
namespace ServerAppFunctionalTests.AdminCommandsTests
|
12 |
|
|
{
|
13 |
|
|
[TestClass]
|
14 |
|
|
public class AdminDataCommandsTesting
|
15 |
|
|
{
|
16 |
|
|
static CommandsAcceptor ca;
|
17 |
|
|
|
18 |
|
|
[ClassInitialize]
|
19 |
|
|
public static void SetUpClass(TestContext context)
|
20 |
|
|
{
|
21 |
|
|
DataDownloader dd = new DataDownloader("./testDD", "http://openstore.zcu.cz/", "OD_ZCU_{type}_{month}_{year}_{format}.zip", "http://wttr.in/Plzen,czechia?format=j1");
|
22 |
|
|
ca = new CommandsAcceptor(dd, null);
|
23 |
|
|
|
24 |
|
|
}
|
25 |
|
|
|
26 |
|
|
[TestMethod]
|
27 |
|
|
public void Test()
|
28 |
|
|
{
|
29 |
|
|
StringReader stringReader = new StringReader("ahoj");
|
30 |
|
|
Console.SetIn(stringReader);
|
31 |
|
|
ca.AcceptCommand();
|
32 |
|
|
|
33 |
|
|
}
|
34 |
|
|
|
35 |
|
|
}
|
36 |
|
|
}
|