/*
 * Copyright 2015-2018 the original author or authors.
 *
 * All rights reserved. This program and the accompanying materials are
 * made available under the terms of the Eclipse Public License v2.0 which
 * accompanies this distribution and is available at
 *
 * http://www.eclipse.org/legal/epl-v20.html
 */

package org.junit.jupiter.api.extension;

import java.util.stream.Stream;

/**
 * <em>Kitchen Sink</em> extension that implements every extension API
 * supported by JUnit Jupiter.
 *
 * <p>This extension should never actually be registered for any tests.
 * Rather, its sole purpose is to help ensure (via visual inspection)
 * that a concrete extension is able to implement all extension APIs
 * supported by JUnit Jupiter without any naming conflicts or
 * ambiguities with regard to method names or method signatures.
 * {@link ExtensionComposabilityTests}, on the other hand, serves
 * the same purpose in a dynamic and automated fashion.
 *
 * @since 5.0
 * @see ExtensionComposabilityTests
 */
// @formatter:off
public class KitchenSinkExtension implements

	// Lifecycle Callbacks
	BeforeAllCallback,
		BeforeEachCallback,
			BeforeTestExecutionCallback,
				TestExecutionExceptionHandler,
			AfterTestExecutionCallback,
		AfterEachCallback,
	AfterAllCallback,

	// Dependency Injection
	TestInstanceFactory,
	TestInstancePostProcessor,
	ParameterResolver,

	// Conditional Test Execution
	ExecutionCondition,

	// @TestTemplate
	TestTemplateInvocationContextProvider

// @formatter:on
{

	// --- Lifecycle Callbacks -------------------------------------------------

	@Override
	public void beforeAll(ExtensionContext context) {
	}

	@Override
	public void beforeEach(ExtensionContext context) {
	}

	@Override
	public void beforeTestExecution(ExtensionContext context) {
	}

	@Override
	public void handleTestExecutionException(ExtensionContext context, Throwable throwable) {
	}

	@Override
	public void afterTestExecution(ExtensionContext context) {
	}

	@Override
	public void afterEach(ExtensionContext context) {
	}

	@Override
	public void afterAll(ExtensionContext context) {
	}

	// --- Dependency Injection ------------------------------------------------

	@Override
	public Object createTestInstance(TestInstanceFactoryContext factoryContext, ExtensionContext extensionContext)
			throws TestInstantiationException {

		return null;
	}

	@Override
	public void postProcessTestInstance(Object testInstance, ExtensionContext context) {
	}

	@Override
	public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
			throws ParameterResolutionException {

		return false;
	}

	@Override
	public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
			throws ParameterResolutionException {

		return null;
	}

	// --- Conditional Test Execution ------------------------------------------

	@Override
	public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) {
		return null;
	}

	// --- @TestTemplate -------------------------------------------------------

	@Override
	public boolean supportsTestTemplate(ExtensionContext context) {
		return false;
	}

	@Override
	public Stream<TestTemplateInvocationContext> provideTestTemplateInvocationContexts(ExtensionContext context) {

		return null;
	}

}

@@ -349,16 +349,43 @@
 nsion;%0A%0A
+import java.util.Optional;%0A
 import j
@@ -1509,16 +1509,49 @@
 Provider
+,%0A%0A%09// Miscellaneous%0A%09TestWatcher
 %0A%0A// @fo
@@ -2369,49 +2369,11 @@
 ext)
-%0A%09%09%09throws TestInstantiationException
  %7B%0A
-%0A
 %09%09re
@@ -2606,51 +2606,11 @@
 ext)
-%0A%09%09%09throws ParameterResolutionException
  %7B%0A
-%0A
 %09%09re
@@ -2741,51 +2741,11 @@
 ext)
-%0A%09%09%09throws ParameterResolutionException
  %7B%0A
-%0A
 %09%09re
@@ -3255,17 +3255,16 @@
 text) %7B%0A
-%0A
 %09%09return
@@ -3274,10 +3274,423 @@
 ll;%0A%09%7D%0A%0A
+%09// --- TestWatcher ---------------------------------------------------------%0A%0A%09@Override%0A%09public void testDisabled(ExtensionContext context, Optional%3CString%3E reason) %7B%0A%09%7D%0A%0A%09@Override%0A%09public void testSuccessful(ExtensionContext context) %7B%0A%09%7D%0A%0A%09@Override%0A%09public void testAborted(ExtensionContext context, Throwable cause) %7B%0A%09%7D%0A%0A%09@Override%0A%09public void testFailed(ExtensionContext context, Throwable cause) %7B%0A%09%7D%0A%0A
 %7D%0A

Include TestWatcher in the KitchenSinkExtension