Skip to content

Commit df35be5

Browse files
committed
JavaFileObjectAssert tests
1 parent eb4bf78 commit df35be5

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright (C) 2022 - 2023, the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package io.github.ascopes.jct.tests.unit.assertions;
17+
18+
import static org.assertj.core.api.Assertions.assertThat;
19+
import static io.github.ascopes.jct.tests.helpers.Fixtures.someJavaFileObject;
20+
21+
import io.github.ascopes.jct.assertions.AbstractJavaFileObjectAssert;
22+
import io.github.ascopes.jct.assertions.JavaFileObjectAssert;
23+
import org.junit.jupiter.api.DisplayName;
24+
import org.junit.jupiter.api.Test;
25+
26+
/**
27+
* {@link JavaFileObjectAssert} tests.
28+
*
29+
* @author Ashley Scopes
30+
*/
31+
@DisplayName("JavaFileObjectAssert tests")
32+
class JavaFileObjectAssertTest {
33+
34+
@DisplayName("Assertions are performed on the JavaFileObject")
35+
@Test
36+
void assertionsArePerformedOnTheJavaFileObject() {
37+
// Given
38+
var javaFileObject = someJavaFileObject();
39+
40+
// When
41+
var assertions = new JavaFileObjectAssert(javaFileObject);
42+
43+
// Then
44+
assertions
45+
.isSameAs(javaFileObject);
46+
assertThat(assertions)
47+
.isInstanceOf(AbstractJavaFileObjectAssert.class);
48+
}
49+
}

0 commit comments

Comments
 (0)