blob: b28d3f3c29a525cf81d9f508b1c0142a404a4137 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.dockerapi;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public class ProcessResultTest {
@Test
public void testBasicProperties() throws Exception {
ProcessResult processResult = new ProcessResult(0, "foo", "bar");
assertThat(processResult.getExitStatus(), is(0));
assertThat(processResult.getOutput(), is("foo"));
assertThat(processResult.isSuccess(), is(true));
}
@Test
public void testSuccessFails() throws Exception {
ProcessResult processResult = new ProcessResult(1, "foo", "bar");
assertThat(processResult.isSuccess(), is(false));
}
}
|