Tweak test script no issue #
[arvados.git] / src / test / java / org / arvados / client / logic / collection / ManifestFactoryTest.java
1 /*
2  * Copyright (C) The Arvados Authors. All rights reserved.
3  *
4  * SPDX-License-Identifier: AGPL-3.0 OR Apache-2.0
5  *
6  */
7
8 package org.arvados.client.logic.collection;
9
10 import org.arvados.client.test.utils.FileTestUtils;
11 import org.assertj.core.util.Lists;
12 import org.junit.Test;
13
14 import java.io.File;
15 import java.util.List;
16
17 import static org.assertj.core.api.Assertions.assertThat;
18
19 public class ManifestFactoryTest {
20     
21     @Test
22     public void manifestIsCreatedAsExpected() throws Exception {
23
24         // given
25         List<File> files = FileTestUtils.generatePredefinedFiles();
26         List<String> locators = Lists.newArrayList("a", "b", "c");
27         ManifestFactory factory = ManifestFactory.builder()
28                 .files(files)
29                 .locators(locators)
30                 .build();
31
32         // when
33         String actual = factory.create();
34
35         // then
36         assertThat(actual).isEqualTo(". a b c 0:1024:test-file1 1024:20480:test-file2 21504:1048576:test-file\\0403\n");
37     }
38 }