Search in sources :

Example 1 with ResourceMojoUtil.getSingletonTemplate

use of io.fabric8.maven.plugin.mojo.build.ResourceMojoUtil.getSingletonTemplate in project fabric8-maven-plugin by fabric8io.

the class ResourceMojoUtilTest method getSingletonTemplateShouldReturnSingleEntry.

@Test
public void getSingletonTemplateShouldReturnSingleEntry(@Mocked KubernetesList mockList, @Mocked Template mockTemplate) {
    new Expectations() {

        {
            mockList.getItems();
            result = Collections.singletonList(mockTemplate);
        }
    };
    final Template result = ResourceMojoUtil.getSingletonTemplate(mockList);
    assertSame(mockTemplate, result);
}
Also used : Expectations(mockit.Expectations) Template(io.fabric8.openshift.api.model.Template) Test(org.junit.Test)

Aggregations

Template (io.fabric8.openshift.api.model.Template)1 Expectations (mockit.Expectations)1 Test (org.junit.Test)1