@@ -0,0 +1,2510 @@
+/*%0A * Copyright 2015-2017 the original author or authors.%0A *%0A * All rights reserved. This program and the accompanying materials are%0A * made available under the terms of the Eclipse Public License v1.0 which%0A * accompanies this distribution and is available at%0A *%0A * http://www.eclipse.org/legal/epl-v10.html%0A */%0A%0Apackage org.junit.platform.console.options;%0A%0Aimport static org.junit.jupiter.api.Assertions.assertAll;%0Aimport static org.junit.jupiter.api.Assertions.assertEquals;%0A%0Aimport java.nio.charset.StandardCharsets;%0A%0Aimport org.junit.jupiter.api.Test;%0Aimport org.junit.platform.engine.TestExecutionResult;%0A%0Aclass ThemeTests %7B%0A%0A%09@Test%0A%09void givenUtf8ShouldReturnUnicode() %7B%0A%09%09assertEquals(Theme.valueOf(StandardCharsets.UTF_8), Theme.UNICODE);%0A%09%7D%0A%0A%09@Test%0A%09void givenAnythingElseShouldReturnAscii() %7B%0A%09%09assertAll(%22All character sets that are not UTF-8 should return Theme.ASCII%22, () -%3E %7B%0A%09%09%09assertEquals(Theme.valueOf(StandardCharsets.ISO_8859_1), Theme.ASCII);%0A%09%09%09assertEquals(Theme.valueOf(StandardCharsets.US_ASCII), Theme.ASCII);%0A%09%09%09assertEquals(Theme.valueOf(StandardCharsets.UTF_16), Theme.ASCII);%0A%09%09%7D);%0A%09%7D%0A%0A%09@Test%0A%09void givenSuccessfulTestExecutionResultShouldReturnAsciiSuccessfulElement() %7B%0A%09%09TestExecutionResult successful = TestExecutionResult.successful();%0A%09%09assertEquals(Theme.ASCII.successful(), Theme.ASCII.status(successful));%0A%09%7D%0A%0A%09@Test%0A%09void givenSuccessfulTestExecutionResultShouldReturnUnicodeSuccessfulElement() %7B%0A%09%09TestExecutionResult successful = TestExecutionResult.successful();%0A%09%09assertEquals(Theme.UNICODE.successful(), Theme.UNICODE.status(successful));%0A%09%7D%0A%0A%09@Test%0A%09void givenAbortedTestExecutionResultShouldReturnAsciiAbortedElement() %7B%0A%09%09TestExecutionResult aborted = TestExecutionResult.aborted(new Throwable());%0A%09%09assertEquals(Theme.ASCII.aborted(), Theme.ASCII.status(aborted));%0A%09%7D%0A%0A%09@Test%0A%09void givenAbortedTestExecutionResultShouldReturnUnicodeAbortedElement() %7B%0A%09%09TestExecutionResult aborted = TestExecutionResult.aborted(new Throwable());%0A%09%09assertEquals(Theme.UNICODE.aborted(), Theme.UNICODE.status(aborted));%0A%09%7D%0A%0A%09@Test%0A%09void givenFailedTestExecutionResultShouldReturnAsciiFailedElement() %7B%0A%09%09TestExecutionResult failed = TestExecutionResult.failed(new Throwable());%0A%09%09assertEquals(Theme.ASCII.failed(), Theme.ASCII.status(failed));%0A%09%7D%0A%0A%09@Test%0A%09void givenFailedTestExecutionResultShouldReturnUnicodeFailedElement() %7B%0A%09%09TestExecutionResult failed = TestExecutionResult.failed(new Throwable());%0A%09%09assertEquals(Theme.UNICODE.failed(), Theme.UNICODE.status(failed));%0A%09%7D%0A%7D%0A

Introduce tests for Theme class