builder:RulesPropertiesTest: added
Remove unused setter on RulesProperties.
This commit is contained in:
parent
e6b1779f72
commit
a31b2d81d3
2 changed files with 35 additions and 2 deletions
|
@ -25,7 +25,6 @@ SOFTWARE.
|
|||
package net.kemitix.checkstyle.ruleset.builder;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
@ -39,7 +38,6 @@ import java.util.List;
|
|||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
@Slf4j
|
||||
@Setter
|
||||
@Getter
|
||||
@Configuration
|
||||
@ConfigurationProperties
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package net.kemitix.checkstyle.ruleset.builder;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link RulesProperties}.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
public class RulesPropertiesTest {
|
||||
|
||||
private RulesProperties rulesProperties;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
rulesProperties = new RulesProperties();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getEmpty() throws Exception {
|
||||
assertThat(rulesProperties.getRules()).isEmpty();
|
||||
}
|
||||
@Test
|
||||
public void getContent() throws Exception {
|
||||
//given
|
||||
final Rule rule = new Rule();
|
||||
//when
|
||||
rulesProperties.getRules().add(rule);
|
||||
//then
|
||||
assertThat(rulesProperties.getRules()).containsExactly(rule);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue