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

@@ -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();
}