@@ -21,7 +21,6 @@ class ConditionalTests {
2121
2222 @ BeforeEach
2323 void clearConfig () {
24-
2524 Config .eventBuilder ("" )
2625 .remove ("secondary" )
2726 .remove ("factory" )
@@ -32,15 +31,14 @@ void clearConfig() {
3231 }
3332
3433 @ Test
35- void basic () throws IOException {
34+ void basic () {
3635 // just wire everything with no test scope, mocks etc
3736 final BeanScope beanScope = BeanScope .builder ().build ();
3837 assertTrue (beanScope .getOptional (Bird .class ).isEmpty ());
3938 }
4039
4140 @ Test
42- void jay () throws IOException {
43-
41+ void jay () {
4442 Config .setProperty ("factory" , "bird" );
4543
4644 final BeanScope beanScope = BeanScope .builder ().build ();
@@ -51,8 +49,7 @@ void jay() throws IOException {
5149 }
5250
5351 @ Test
54- void birdWatch () throws IOException {
55-
52+ void birdWatch () {
5653 Config .setProperty ("factory" , "bird" );
5754 Config .setProperty ("watcher" , "bird" );
5855
@@ -62,8 +59,7 @@ void birdWatch() throws IOException {
6259 }
6360
6461 @ Test
65- void missingBeans () throws IOException {
66-
62+ void missingBeans () {
6763 Config .setProperty ("watcher" , "bird" );
6864
6965 final BeanScope beanScope = BeanScope .builder ().build ();
@@ -72,34 +68,33 @@ void missingBeans() throws IOException {
7268 }
7369
7470 @ Test
75- void noFactory () throws IOException {
76-
71+ void noFactory () {
7772 Config .setProperty ("kiwi" , "somethin" );
7873 Config .setProperty ("watcher" , "bird" );
7974
8075 final BeanScope beanScope = BeanScope .builder ().build ();
8176
77+ assertTrue (beanScope .getOptional (WithAspectConditional .class ).isEmpty ());
8278 assertTrue (beanScope .getOptional (BirdFactory .class ).isEmpty ());
8379 assertTrue (beanScope .getOptional (BlueJay .class ).isEmpty ());
8480 assertTrue (beanScope .getOptional (BirdWatcher .class ).isPresent ());
8581 assertEquals ("Kiwi" , beanScope .get (Bird .class ).toString ());
8682 }
8783
8884 @ Test
89- void factoryKiwiOverride () throws IOException {
90-
85+ void factoryKiwiOverride () {
9186 Config .setProperty ("kiwi" , "somethin" );
9287 Config .setProperty ("factory" , "bird" );
9388 Config .setProperty ("watcher" , "bird" );
9489
9590 final BeanScope beanScope = BeanScope .builder ().build ();
9691 assertTrue (beanScope .getOptional (BirdWatcher .class ).isPresent ());
92+ assertTrue (beanScope .getOptional (WithAspectConditional .class ).isPresent ());
9793 assertEquals ("Kiwi" , beanScope .get (Bird .class ).toString ());
9894 }
9995
10096 @ Test
101- void factorySecondaryOverride () throws IOException {
102-
97+ void factorySecondaryOverride () {
10398 Config .setProperty ("secondary" , "somethin" );
10499 Config .setProperty ("factory" , "bird" );
105100 Config .setProperty ("watcher" , "bird" );
@@ -110,16 +105,14 @@ void factorySecondaryOverride() throws IOException {
110105 }
111106
112107 @ Test
113- void qualifierTest () throws IOException {
114-
108+ void qualifierTest () {
115109 final BeanScope beanScope =
116110 BeanScope .builder ().bean ("finch" , Bird .class , new StrawberryFinch ()).build ();
117111 assertTrue (beanScope .getOptional (QualifiedBirdWatcher .class ).isPresent ());
118112 }
119113
120114 @ Test
121- void metaMetaAnnotationTest () throws IOException {
122-
115+ void metaMetaAnnotationTest () {
123116 Config .setProperty ("finch-time" , "somethin" );
124117 Config .setProperty ("factory" , "bird" );
125118 Config .setProperty ("watcher" , "bird" );
0 commit comments