// Path: src/main/java/com/github/mjeanroy/maven/plugins/node/exceptions/PackageJsonNotFoundException.java
// @SuppressWarnings("serial")
// public class PackageJsonNotFoundException extends RuntimeException {
// 
// 	/**
// 	 * Create exception.
// 	 *
// 	 * @param file File that should point to package.json.
// 	 */
// 	public PackageJsonNotFoundException(File file) {
// 		super("File " + file.getAbsolutePath() + " does not exist");
// 	}
// }
// 
// Path: src/test/java/com/github/mjeanroy/maven/plugins/node/tests/ReflectTestUtils.java
// @SuppressWarnings("unchecked")
// public static <T> T readPrivate(Object instance, String name) {
// 	try {
// 		return (T) readField(instance, name, true);
// 	}
// 	catch (Exception ex) {
// 		throw new AssertionError(ex);
// 	}
// }


import static com.github.mjeanroy.maven.plugins.node.tests.ReflectTestUtils.readPrivate;
import static java.util.Collections.singletonMap;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.Mockito.inOrder;
import com.github.mjeanroy.maven.plugins.node.exceptions.PackageJsonNotFoundException;
import org.apache.maven.plugin.logging.Log;
import org.assertj.core.api.ThrowableAssert.ThrowingCallable;
import org.junit.Test;
import org.mockito.InOrder;
import java.io.File;
/**
 * The MIT License (MIT)
 *
 * Copyright (c) 2015-2021 Mickael Jeanroy
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package com.github.mjeanroy.maven.plugins.node.mojos;




public class DependenciesMojoTest extends AbstractMojoTest<DependenciesMojo> {

	@Override
	String mojoName() {
		return "dependencies";
	}

	@Test
	public void it_should_execute_mojo() {
		DependenciesMojo mojo = lookupEmptyMojo("mojo");
		Log logger = readPrivate(mojo, "log");

		mojo.execute();

		InOrder inOrder = inOrder(logger);
		inOrder.verify(logger).info("  == dependencies");
		inOrder.verify(logger).info("     react -- 0.13.3");
		inOrder.verify(logger).info("     jquery -- 2.11");
		inOrder.verify(logger).info("  == devDependencies");
// Path: src/main/java/com/github/mjeanroy/maven/plugins/node/exceptions/PackageJsonNotFoundException.java
// @SuppressWarnings("serial")
// public class PackageJsonNotFoundException extends RuntimeException {
// 
// 	/**
// 	 * Create exception.
// 	 *
// 	 * @param file File that should point to package.json.
// 	 */
// 	public PackageJsonNotFoundException(File file) {
// 		super("File " + file.getAbsolutePath() + " does not exist");
// 	}
// }
// 
// Path: src/test/java/com/github/mjeanroy/maven/plugins/node/tests/ReflectTestUtils.java
// @SuppressWarnings("unchecked")
// public static <T> T readPrivate(Object instance, String name) {
// 	try {
// 		return (T) readField(instance, name, true);
// 	}
// 	catch (Exception ex) {
// 		throw new AssertionError(ex);
// 	}
// }


// Path: src/test/java/com/github/mjeanroy/maven/plugins/node/mojos/DependenciesMojoTest.java
import static com.github.mjeanroy.maven.plugins.node.tests.ReflectTestUtils.readPrivate;
import static java.util.Collections.singletonMap;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.Mockito.inOrder;
import com.github.mjeanroy.maven.plugins.node.exceptions.PackageJsonNotFoundException;
import org.apache.maven.plugin.logging.Log;
import org.assertj.core.api.ThrowableAssert.ThrowingCallable;
import org.junit.Test;
import org.mockito.InOrder;
import java.io.File;

/**
 * The MIT License (MIT)
 *
 * Copyright (c) 2015-2021 Mickael Jeanroy
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package com.github.mjeanroy.maven.plugins.node.mojos;




public class DependenciesMojoTest extends AbstractMojoTest<DependenciesMojo> {

	@Override
	String mojoName() {
		return "dependencies";
	}

	@Test
	public void it_should_execute_mojo() {
		DependenciesMojo mojo = lookupEmptyMojo("mojo");
		Log logger = readPrivate(mojo, "log");

		mojo.execute();

		InOrder inOrder = inOrder(logger);
		inOrder.verify(logger).info("  == dependencies");
		inOrder.verify(logger).info("     react -- 0.13.3");
		inOrder.verify(logger).info("     jquery -- 2.11");
		inOrder.verify(logger).info("  == devDependencies");
		inOrder.verify(logger).info("     gulp -- 3.9.0");