RepositoryTests : adaptation des tests suite aux changements subis par AppData et Repository
This commit is contained in:
parent
18df312592
commit
8f09dd29b6
@ -35,14 +35,13 @@ public class RepositoryTests {
|
|||||||
appConfig.setMulticastPort(15502);
|
appConfig.setMulticastPort(15502);
|
||||||
appConfig.setNetworkInterface("My network interface");
|
appConfig.setNetworkInterface("My network interface");
|
||||||
appConfig.setTls(false);
|
appConfig.setTls(false);
|
||||||
Map<String, File> files = new HashMap<>();
|
|
||||||
Set<String> storage = new HashSet<>();
|
Set<String> storage = new HashSet<>();
|
||||||
storage.add("StorBackEnd1");
|
storage.add("StorBackEnd1");
|
||||||
File file1 = new File("File1", 15, "8d8d8d8d", storage);
|
File file1 = new File("File1", 15, "8d8d8d8d", storage);
|
||||||
files.put(file1.getName(), file1);
|
|
||||||
appData.setAppConfig(appConfig);
|
appData.setAppConfig(appConfig);
|
||||||
appData.addUser("User1", "Password", "djdjjdj");
|
appData.addUser("User1", "Password", "djdjjdj");
|
||||||
JsonAdapter jsonAdapter = new JsonAdapter(appData);
|
JsonAdapter jsonAdapter = new JsonAdapter(appData);
|
||||||
|
appData.addFileFor(file1, "User1");
|
||||||
//WHEN Repository calls save method
|
//WHEN Repository calls save method
|
||||||
String filePath = "src/test/resources/test.json";
|
String filePath = "src/test/resources/test.json";
|
||||||
Repository repository = new Repository(filePath, jsonAdapter);
|
Repository repository = new Repository(filePath, jsonAdapter);
|
||||||
|
Loading…
Reference in New Issue
Block a user