File tree Expand file tree Collapse file tree 3 files changed +120
-0
lines changed
src/test/java/org/assertj/db/type Expand file tree Collapse file tree 3 files changed +120
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
3+ * the License. You may obtain a copy of the License at
4+ *
5+ * http://www.apache.org/licenses/LICENSE-2.0
6+ *
7+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
8+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
9+ * specific language governing permissions and limitations under the License.
10+ *
11+ * Copyright 2015-2025 the original author or authors.
12+ */
13+ package org .assertj .db .type ;
14+
15+ import static org .assertj .core .api .Assertions .assertThat ;
16+
17+ import org .assertj .db .api .ChangesAssert ;
18+ import org .assertj .db .common .AbstractTest ;
19+ import org .junit .Test ;
20+
21+ /**
22+ * These tests are on the return from the {@code assertThat} method of {@code Changes}.
23+ * <p>
24+ *
25+ * @author Jonathan Maniquet
26+ */
27+ public class Changes_AssertThat_Test extends AbstractTest {
28+
29+ /**
30+ * This method tests the result of {@code assertThat} method from {@code Changes}.
31+ */
32+ @ Test
33+ public void test_result_of_assertThat () {
34+ Changes changes = assertDbConnection .changes ().request ("SELECT actor.name FROM actor" ).build ();
35+
36+ ChangesAssert assertObject = changes .assertThat ();
37+ assertThat (assertObject ).isNotNull ()
38+ .extracting ("changes" ).isSameAs (changes );
39+ }
40+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
3+ * the License. You may obtain a copy of the License at
4+ *
5+ * http://www.apache.org/licenses/LICENSE-2.0
6+ *
7+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
8+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
9+ * specific language governing permissions and limitations under the License.
10+ *
11+ * Copyright 2015-2025 the original author or authors.
12+ */
13+ package org .assertj .db .type ;
14+
15+ import static org .assertj .core .api .Assertions .assertThat ;
16+
17+ import org .assertj .db .api .RequestAssert ;
18+ import org .assertj .db .common .AbstractTest ;
19+ import org .junit .Test ;
20+
21+ /**
22+ * These tests are on the return from the {@code assertThat} method of {@code Request}.
23+ * <p>
24+ *
25+ * @author Jonathan Maniquet
26+ */
27+ public class Request_AssertThat_Test extends AbstractTest {
28+
29+ /**
30+ * This method tests the result of {@code assertThat} method from {@code Request}.
31+ */
32+ @ Test
33+ public void test_result_of_assertThat () {
34+ Request request = assertDbConnection .request ("SELECT actor.name FROM actor" ).build ();
35+
36+ RequestAssert assertObject = request .assertThat ();
37+ assertThat (assertObject ).isNotNull ()
38+ .extracting ("actual" ).isSameAs (request );
39+ }
40+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
3+ * the License. You may obtain a copy of the License at
4+ *
5+ * http://www.apache.org/licenses/LICENSE-2.0
6+ *
7+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
8+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
9+ * specific language governing permissions and limitations under the License.
10+ *
11+ * Copyright 2015-2025 the original author or authors.
12+ */
13+ package org .assertj .db .type ;
14+
15+ import static org .assertj .core .api .Assertions .assertThat ;
16+
17+ import org .assertj .db .api .TableAssert ;
18+ import org .assertj .db .common .AbstractTest ;
19+ import org .junit .Test ;
20+
21+ /**
22+ * These tests are on the return from the {@code assertThat} method of {@code Table}.
23+ * <p>
24+ *
25+ * @author Jonathan Maniquet
26+ */
27+ public class Table_AssertThat_Test extends AbstractTest {
28+
29+ /**
30+ * This method tests the result of {@code assertThat} method from {@code Table}.
31+ */
32+ @ Test
33+ public void test_result_of_assertThat () {
34+ Table table = assertDbConnection .table ("actor" ).build ();
35+
36+ TableAssert assertObject = table .assertThat ();
37+ assertThat (assertObject ).isNotNull ()
38+ .extracting ("actual" ).isSameAs (table );
39+ }
40+ }
You can’t perform that action at this time.
0 commit comments