Remove yang-maven-plugin interfaces
[yangtools.git] / plugin / yang-maven-plugin / src / test / java / org / opendaylight / yangtools / yang2sources / plugin / GenerateSourcesTest.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang2sources.plugin;
9
10 import static org.mockito.ArgumentMatchers.any;
11 import static org.mockito.Mockito.doReturn;
12 import static org.mockito.Mockito.verify;
13
14 import com.google.common.collect.ImmutableTable;
15 import com.google.common.io.Resources;
16 import java.io.File;
17 import java.util.List;
18 import org.junit.Test;
19
20 public class GenerateSourcesTest extends AbstractCodeGeneratorTest {
21     @Test
22     public void test() throws Exception {
23         assertMojoExecution(new YangToSourcesProcessor(
24             new File(Resources.getResource(GenerateSourcesTest.class, "/yang").toURI()), List.of(),
25             List.of(new FileGeneratorArg("mockGenerator")), project, false, yangProvider),
26             mock -> {
27                 doReturn(ImmutableTable.of()).when(mock).generateFiles(any(), any(), any());
28             },
29             mock -> {
30                 verify(mock).generateFiles(any(), any(), any());
31             });
32     }
33 }