import java.io.IOException;
import java.nio.file.LinkOption;
import java.nio.file.Path;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import javax.annotation.CheckForNull;
import javax.annotation.concurrent.Immutable;
private final String description;
private final String keyWithBranch;
private final String branch;
- private final List<String> sources;
- private final List<String> tests;
private final Map<String, String> properties;
private final String moduleKey;
this.description = definition.getDescription();
this.keyWithBranch = definition.getKeyWithBranch();
this.branch = definition.getBranch();
- this.sources = Collections.unmodifiableList(new ArrayList<>(definition.sources()));
- this.tests = Collections.unmodifiableList(new ArrayList<>(definition.tests()));
this.properties = Collections.unmodifiableMap(new HashMap<>(definition.properties()));
this.definition = definition;
return description;
}
- /**
- * @return Source files and folders.
- */
- public List<String> sources() {
- return sources;
- }
-
- public List<String> tests() {
- return tests;
- }
-
}
import java.io.File;
import java.io.IOException;
-import java.util.Collections;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
assertThat(module.getOriginalVersion()).isEqualTo("version");
assertThat(module.getDescription()).isEqualTo("desc");
assertThat(module.getWorkDir()).isEqualTo(workDir.toPath());
- assertThat(module.sources()).isEqualTo(Collections.singletonList("file1"));
- assertThat(module.tests()).isEqualTo(Collections.singletonList("test1"));
assertThat(module.properties()).hasSize(6);