Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06cc87b
commit caf79cb
Showing
2 changed files
with
44 additions
and
46 deletions.
There are no files selected for viewing
82 changes: 41 additions & 41 deletions
82
...config/image/src/test/java/org/eclipse/jkube/kit/config/image/ImageConfigurationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
///** | ||
// * Copyright (c) 2019 Red Hat, Inc. | ||
// * This program and the accompanying materials are made | ||
// * available under the terms of the Eclipse Public License 2.0 | ||
// * which is available at: | ||
// * | ||
// * https://www.eclipse.org/legal/epl-2.0/ | ||
// * | ||
// * SPDX-License-Identifier: EPL-2.0 | ||
// * | ||
// * Contributors: | ||
// * Red Hat, Inc. - initial API and implementation | ||
// */ | ||
//package org.eclipse.jkube.kit.config.image; | ||
// | ||
//import org.eclipse.jkube.kit.config.image.build.BuildConfiguration; | ||
// | ||
//import org.junit.jupiter.api.Test; | ||
// | ||
//import static org.assertj.core.api.Assertions.assertThat; | ||
//import static org.mockito.Mockito.mock; | ||
//import static org.mockito.Mockito.when; | ||
// | ||
// | ||
//class ImageConfigurationTest { | ||
// | ||
// @Test | ||
// void testBuilder() { | ||
// // Given | ||
// BuildConfiguration mockJKubeBuildConfiguration = mock(BuildConfiguration.class); | ||
// when(mockJKubeBuildConfiguration.getUser()).thenReturn("super-user"); | ||
// // When | ||
// final ImageConfiguration result = ImageConfiguration.builder() | ||
// .name("1337") | ||
// .build(mockJKubeBuildConfiguration) | ||
// .build(); | ||
// // Then | ||
// assertThat(result.getName()).isEqualTo("1337"); | ||
// assertThat(result.getBuildConfiguration().getUser()).isEqualTo("super-user"); | ||
// } | ||
//} | ||
/** | ||
* Copyright (c) 2019 Red Hat, Inc. | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at: | ||
* | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Red Hat, Inc. - initial API and implementation | ||
*/ | ||
package org.eclipse.jkube.kit.config.image; | ||
|
||
import org.eclipse.jkube.kit.config.image.build.BuildConfiguration; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
import static org.mockito.Mockito.mock; | ||
import static org.mockito.Mockito.when; | ||
|
||
|
||
class ImageConfigurationTest { | ||
|
||
@Test | ||
void testBuilder() { | ||
// Given | ||
BuildConfiguration mockJKubeBuildConfiguration = mock(BuildConfiguration.class); | ||
when(mockJKubeBuildConfiguration.getUser()).thenReturn("super-user"); | ||
// When | ||
final ImageConfiguration result = ImageConfiguration.builder() | ||
.name("1337") | ||
.build(mockJKubeBuildConfiguration) | ||
.build(); | ||
// Then | ||
assertThat(result.getName()).isEqualTo("1337"); | ||
assertThat(result.getBuildConfiguration().getUser()).isEqualTo("super-user"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters