2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang2sources.plugin;
10 import static org.mockito.ArgumentMatchers.any;
11 import static org.mockito.Mockito.doReturn;
12 import static org.mockito.Mockito.verify;
14 import com.google.common.collect.ImmutableTable;
15 import com.google.common.io.Resources;
17 import java.util.List;
18 import org.junit.Test;
20 public class GenerateSourcesTest extends AbstractCodeGeneratorTest {
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),
27 doReturn(ImmutableTable.of()).when(mock).generateFiles(any(), any(), any());
30 verify(mock).generateFiles(any(), any(), any());