1 /*******************************************************************************
2 * Copyright (c) 2012-2013,2015 University of Stuttgart.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * and the Apache License 2.0 which both accompany this distribution,
6 * and are available at http://www.eclipse.org/legal/epl-v10.html
7 * and http://www.apache.org/licenses/LICENSE-2.0
10 * Oliver Kopp - initial API and implementation
11 *******************************************************************************/
12 package org.eclipse.winery.repository.importing;
14 import java.nio.file.FileSystems;
15 import java.nio.file.Path;
16 import java.util.ArrayList;
17 import java.util.List;
19 import org.eclipse.winery.repository.PrefsTestEnabledUsingConfiguredRepository;
20 import org.junit.BeforeClass;
21 import org.junit.Test;
23 public class TestCSARImporter {
26 * Ensure that Repository.INSTANCE exists
29 public static void setupPrefs() throws Exception {
30 // Initialize preferences
31 // We do not need them directly, but constructing them has the side effect that Repository.INSTANCE is != null
32 new PrefsTestEnabledUsingConfiguredRepository();
36 * Quick hack to test Moodle Import
38 * Currently, no CSARs are put into the test resources, we rely on local
42 public void testMoodleImport() throws Exception {
43 CSARImporter i = new CSARImporter();
44 Path p = FileSystems.getDefault().getPath("C:\\Users\\Oliver\\BTSync\\Projects\\OpenTOSCA\\MoodleInteropCSAR\\trunk");
45 List<String> errors = new ArrayList<String>();
46 i.importFromDir(p, errors, true, false);