Polish "Add TestNG support in TestTypeExcludeFilter"

See gh-7630
This commit is contained in:
Andy Wilkinson 2019-02-12 15:26:04 +00:00
parent b005008cac
commit c04eba7ebc
4 changed files with 12 additions and 17 deletions

View File

@ -182,7 +182,6 @@
<statsd-client.version>3.1.0</statsd-client.version>
<sun-mail.version>${javax-mail.version}</sun-mail.version>
<saaj-impl.version>1.5.0</saaj-impl.version>
<testng.version>6.10</testng.version>
<thymeleaf.version>3.0.11.RELEASE</thymeleaf.version>
<thymeleaf-extras-springsecurity.version>3.0.4.RELEASE</thymeleaf-extras-springsecurity.version>
<thymeleaf-layout-dialect.version>2.3.0</thymeleaf-layout-dialect.version>
@ -2966,11 +2965,6 @@
<artifactId>nio-multipart-parser</artifactId>
<version>${nio-multipart-parser.version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>

View File

@ -27,6 +27,7 @@
<maven-resolver.version>1.1.1</maven-resolver.version>
<spock.version>1.0-groovy-2.4</spock.version>
<testcontainers.version>1.10.6</testcontainers.version>
<testng.version>6.14.3</testng.version>
<dependency-management-plugin.version>1.0.6.RELEASE</dependency-management-plugin.version>
<spring-doc-resources.version>0.1.0.BUILD-SNAPSHOT</spring-doc-resources.version>
</properties>
@ -246,6 +247,11 @@
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
</dependency>
<dependency>
<groupId>org.zeroturnaround</groupId>
<artifactId>zt-zip</artifactId>

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -20,14 +20,8 @@ import org.testng.annotations.Test;
import org.springframework.context.annotation.Configuration;
/**
* Abstract test with nest {@code @Configuration} and {@code @Test} used by
* {@link TestTypeExcludeFilter}.
*
* @author Eddú Meléndez
*/
@Test
public abstract class AbstractTestNG {
public abstract class AbstractTestNgTestWithConfig {
@Configuration
static class Config {

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -99,9 +99,10 @@ public class TestTypeExcludeFilterTests {
}
@Test
public void matchesNestedConfigurationClassWithoutTestngAnnotation()
public void matchesNestedConfigurationClassWithoutTestNgAnnotation()
throws Exception {
assertThat(this.filter.match(getMetadataReader(AbstractTestNG.Config.class),
assertThat(this.filter.match(
getMetadataReader(AbstractTestNgTestWithConfig.Config.class),
this.metadataReaderFactory)).isTrue();
}