/external/apache-harmony/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLFeatureNotSupportedExceptionTest.java

https://gitlab.com/brian0218/rk3188_rk3066_r-box_android4.4.2_sdk · Java · 996 lines · 767 code · 57 blank · 172 comment · 0 complexity · 99acd0322e4d159dacbb99d3a660c2c3 MD5 · raw file

  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. package org.apache.harmony.sql.tests.java.sql;
  18. import java.sql.SQLFeatureNotSupportedException;
  19. import junit.framework.TestCase;
  20. import org.apache.harmony.testframework.serialization.SerializationTest;
  21. public class SQLFeatureNotSupportedExceptionTest extends TestCase {
  22. private SQLFeatureNotSupportedException sQLFeatureNotSupportedException;
  23. protected void setUp() throws Exception {
  24. sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  25. "MYTESTSTRING", "MYTESTSTRING", 1, new Exception("MYTHROWABLE"));
  26. }
  27. protected void tearDown() throws Exception {
  28. sQLFeatureNotSupportedException = null;
  29. }
  30. /**
  31. * @test java.sql.SQLFeatureNotSupportedException(String)
  32. */
  33. public void test_Constructor_LString() {
  34. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  35. "MYTESTSTRING");
  36. assertNotNull(sQLFeatureNotSupportedException);
  37. assertNull(
  38. "The SQLState of SQLFeatureNotSupportedException should be null",
  39. sQLFeatureNotSupportedException.getSQLState());
  40. assertEquals(
  41. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  42. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  43. assertEquals(
  44. "The error code of SQLFeatureNotSupportedException should be 0",
  45. sQLFeatureNotSupportedException.getErrorCode(), 0);
  46. }
  47. /**
  48. * @test java.sql.SQLFeatureNotSupportedException(String)
  49. */
  50. public void test_Constructor_LString_1() {
  51. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  52. (String) null);
  53. assertNotNull(sQLFeatureNotSupportedException);
  54. assertNull(
  55. "The SQLState of SQLFeatureNotSupportedException should be null",
  56. sQLFeatureNotSupportedException.getSQLState());
  57. assertNull(
  58. "The reason of SQLFeatureNotSupportedException should be null",
  59. sQLFeatureNotSupportedException.getMessage());
  60. assertEquals(
  61. "The error code of SQLFeatureNotSupportedException should be 0",
  62. sQLFeatureNotSupportedException.getErrorCode(), 0);
  63. }
  64. /**
  65. * @test java.sql.SQLFeatureNotSupportedException(String, String)
  66. */
  67. public void test_Constructor_LStringLString() {
  68. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  69. "MYTESTSTRING1", "MYTESTSTRING2");
  70. assertNotNull(sQLFeatureNotSupportedException);
  71. assertEquals(
  72. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  73. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  74. assertEquals(
  75. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  76. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  77. assertEquals(
  78. "The error code of SQLFeatureNotSupportedException should be 0",
  79. sQLFeatureNotSupportedException.getErrorCode(), 0);
  80. }
  81. /**
  82. * @test java.sql.SQLFeatureNotSupportedException(String, String)
  83. */
  84. public void test_Constructor_LStringLString_1() {
  85. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  86. "MYTESTSTRING", (String) null);
  87. assertNotNull(sQLFeatureNotSupportedException);
  88. assertNull(
  89. "The SQLState of SQLFeatureNotSupportedException should be null",
  90. sQLFeatureNotSupportedException.getSQLState());
  91. assertEquals(
  92. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  93. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  94. assertEquals(
  95. "The error code of SQLFeatureNotSupportedException should be 0",
  96. sQLFeatureNotSupportedException.getErrorCode(), 0);
  97. }
  98. /**
  99. * @test java.sql.SQLFeatureNotSupportedException(String, String)
  100. */
  101. public void test_Constructor_LStringLString_2() {
  102. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  103. null, "MYTESTSTRING");
  104. assertNotNull(sQLFeatureNotSupportedException);
  105. assertEquals(
  106. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  107. "MYTESTSTRING", sQLFeatureNotSupportedException.getSQLState());
  108. assertNull(
  109. "The reason of SQLFeatureNotSupportedException should be null",
  110. sQLFeatureNotSupportedException.getMessage());
  111. assertEquals(
  112. "The error code of SQLFeatureNotSupportedException should be 0",
  113. sQLFeatureNotSupportedException.getErrorCode(), 0);
  114. }
  115. /**
  116. * @test java.sql.SQLFeatureNotSupportedException(String, String)
  117. */
  118. public void test_Constructor_LStringLString_3() {
  119. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  120. (String) null, (String) null);
  121. assertNotNull(sQLFeatureNotSupportedException);
  122. assertNull(
  123. "The SQLState of SQLFeatureNotSupportedException should be null",
  124. sQLFeatureNotSupportedException.getSQLState());
  125. assertNull(
  126. "The reason of SQLFeatureNotSupportedException should be null",
  127. sQLFeatureNotSupportedException.getMessage());
  128. assertEquals(
  129. "The error code of SQLFeatureNotSupportedException should be 0",
  130. sQLFeatureNotSupportedException.getErrorCode(), 0);
  131. }
  132. /**
  133. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  134. */
  135. public void test_Constructor_LStringLStringI() {
  136. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  137. "MYTESTSTRING1", "MYTESTSTRING2", 1);
  138. assertNotNull(sQLFeatureNotSupportedException);
  139. assertEquals(
  140. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  141. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  142. assertEquals(
  143. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  144. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  145. assertEquals(
  146. "The error code of SQLFeatureNotSupportedException should be 1",
  147. sQLFeatureNotSupportedException.getErrorCode(), 1);
  148. }
  149. /**
  150. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  151. */
  152. public void test_Constructor_LStringLStringI_1() {
  153. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  154. "MYTESTSTRING1", "MYTESTSTRING2", 0);
  155. assertNotNull(sQLFeatureNotSupportedException);
  156. assertEquals(
  157. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  158. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  159. assertEquals(
  160. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  161. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  162. assertEquals(
  163. "The error code of SQLFeatureNotSupportedException should be 0",
  164. sQLFeatureNotSupportedException.getErrorCode(), 0);
  165. }
  166. /**
  167. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  168. */
  169. public void test_Constructor_LStringLStringI_2() {
  170. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  171. "MYTESTSTRING1", "MYTESTSTRING2", -1);
  172. assertNotNull(sQLFeatureNotSupportedException);
  173. assertEquals(
  174. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  175. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  176. assertEquals(
  177. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  178. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  179. assertEquals(
  180. "The error code of SQLFeatureNotSupportedException should be -1",
  181. sQLFeatureNotSupportedException.getErrorCode(), -1);
  182. }
  183. /**
  184. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  185. */
  186. public void test_Constructor_LStringLStringI_3() {
  187. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  188. "MYTESTSTRING", null, 1);
  189. assertNotNull(sQLFeatureNotSupportedException);
  190. assertNull(
  191. "The SQLState of SQLFeatureNotSupportedException should be null",
  192. sQLFeatureNotSupportedException.getSQLState());
  193. assertEquals(
  194. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  195. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  196. assertEquals(
  197. "The error code of SQLFeatureNotSupportedException should be 1",
  198. sQLFeatureNotSupportedException.getErrorCode(), 1);
  199. }
  200. /**
  201. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  202. */
  203. public void test_Constructor_LStringLStringI_4() {
  204. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  205. "MYTESTSTRING", null, 0);
  206. assertNotNull(sQLFeatureNotSupportedException);
  207. assertNull(
  208. "The SQLState of SQLFeatureNotSupportedException should be null",
  209. sQLFeatureNotSupportedException.getSQLState());
  210. assertEquals(
  211. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  212. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  213. assertEquals(
  214. "The error code of SQLFeatureNotSupportedException should be 0",
  215. sQLFeatureNotSupportedException.getErrorCode(), 0);
  216. }
  217. /**
  218. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  219. */
  220. public void test_Constructor_LStringLStringI_5() {
  221. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  222. "MYTESTSTRING", null, -1);
  223. assertNotNull(sQLFeatureNotSupportedException);
  224. assertNull(
  225. "The SQLState of SQLFeatureNotSupportedException should be null",
  226. sQLFeatureNotSupportedException.getSQLState());
  227. assertEquals(
  228. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  229. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  230. assertEquals(
  231. "The error code of SQLFeatureNotSupportedException should be -1",
  232. sQLFeatureNotSupportedException.getErrorCode(), -1);
  233. }
  234. /**
  235. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  236. */
  237. public void test_Constructor_LStringLStringI_6() {
  238. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  239. null, "MYTESTSTRING", 1);
  240. assertNotNull(sQLFeatureNotSupportedException);
  241. assertEquals(
  242. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  243. "MYTESTSTRING", sQLFeatureNotSupportedException.getSQLState());
  244. assertNull(
  245. "The reason of SQLFeatureNotSupportedException should be null",
  246. sQLFeatureNotSupportedException.getMessage());
  247. assertEquals(
  248. "The error code of SQLFeatureNotSupportedException should be 1",
  249. sQLFeatureNotSupportedException.getErrorCode(), 1);
  250. }
  251. /**
  252. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  253. */
  254. public void test_Constructor_LStringLStringI_7() {
  255. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  256. null, "MYTESTSTRING", 0);
  257. assertNotNull(sQLFeatureNotSupportedException);
  258. assertEquals(
  259. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  260. "MYTESTSTRING", sQLFeatureNotSupportedException.getSQLState());
  261. assertNull(
  262. "The reason of SQLFeatureNotSupportedException should be null",
  263. sQLFeatureNotSupportedException.getMessage());
  264. assertEquals(
  265. "The error code of SQLFeatureNotSupportedException should be 0",
  266. sQLFeatureNotSupportedException.getErrorCode(), 0);
  267. }
  268. /**
  269. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  270. */
  271. public void test_Constructor_LStringLStringI_8() {
  272. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  273. null, "MYTESTSTRING", -1);
  274. assertNotNull(sQLFeatureNotSupportedException);
  275. assertEquals(
  276. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  277. "MYTESTSTRING", sQLFeatureNotSupportedException.getSQLState());
  278. assertNull(
  279. "The reason of SQLFeatureNotSupportedException should be null",
  280. sQLFeatureNotSupportedException.getMessage());
  281. assertEquals(
  282. "The error code of SQLFeatureNotSupportedException should be -1",
  283. sQLFeatureNotSupportedException.getErrorCode(), -1);
  284. }
  285. /**
  286. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  287. */
  288. public void test_Constructor_LStringLStringI_9() {
  289. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  290. null, null, 1);
  291. assertNotNull(sQLFeatureNotSupportedException);
  292. assertNull(
  293. "The SQLState of SQLFeatureNotSupportedException should be null",
  294. sQLFeatureNotSupportedException.getSQLState());
  295. assertNull(
  296. "The reason of SQLFeatureNotSupportedException should be null",
  297. sQLFeatureNotSupportedException.getMessage());
  298. assertEquals(
  299. "The error code of SQLFeatureNotSupportedException should be 1",
  300. sQLFeatureNotSupportedException.getErrorCode(), 1);
  301. }
  302. /**
  303. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  304. */
  305. public void test_Constructor_LStringLStringI_10() {
  306. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  307. null, null, 0);
  308. assertNotNull(sQLFeatureNotSupportedException);
  309. assertNull(
  310. "The SQLState of SQLFeatureNotSupportedException should be null",
  311. sQLFeatureNotSupportedException.getSQLState());
  312. assertNull(
  313. "The reason of SQLFeatureNotSupportedException should be null",
  314. sQLFeatureNotSupportedException.getMessage());
  315. assertEquals(
  316. "The error code of SQLFeatureNotSupportedException should be 0",
  317. sQLFeatureNotSupportedException.getErrorCode(), 0);
  318. }
  319. /**
  320. * @test java.sql.SQLFeatureNotSupportedException(String, String, int)
  321. */
  322. public void test_Constructor_LStringLStringI_11() {
  323. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  324. null, null, -1);
  325. assertNotNull(sQLFeatureNotSupportedException);
  326. assertNull(
  327. "The SQLState of SQLFeatureNotSupportedException should be null",
  328. sQLFeatureNotSupportedException.getSQLState());
  329. assertNull(
  330. "The reason of SQLFeatureNotSupportedException should be null",
  331. sQLFeatureNotSupportedException.getMessage());
  332. assertEquals(
  333. "The error code of SQLFeatureNotSupportedException should be -1",
  334. sQLFeatureNotSupportedException.getErrorCode(), -1);
  335. }
  336. /**
  337. * @test java.sql.SQLFeatureNotSupportedException(Throwable)
  338. */
  339. public void test_Constructor_LThrowable() {
  340. Throwable cause = new Exception("MYTHROWABLE");
  341. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  342. cause);
  343. assertNotNull(sQLFeatureNotSupportedException);
  344. assertEquals(
  345. "The reason of SQLFeatureNotSupportedException should be equals to cause.toString()",
  346. "java.lang.Exception: MYTHROWABLE",
  347. sQLFeatureNotSupportedException.getMessage());
  348. assertNull(
  349. "The SQLState of SQLFeatureNotSupportedException should be null",
  350. sQLFeatureNotSupportedException.getSQLState());
  351. assertEquals(
  352. "The error code of SQLFeatureNotSupportedException should be 0",
  353. sQLFeatureNotSupportedException.getErrorCode(), 0);
  354. assertEquals(
  355. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  356. cause, sQLFeatureNotSupportedException.getCause());
  357. }
  358. /**
  359. * @test java.sql.SQLFeatureNotSupportedException(Throwable)
  360. */
  361. public void test_Constructor_LThrowable_1() {
  362. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  363. (Throwable) null);
  364. assertNotNull(sQLFeatureNotSupportedException);
  365. assertNull(
  366. "The SQLState of SQLFeatureNotSupportedException should be null",
  367. sQLFeatureNotSupportedException.getSQLState());
  368. assertNull(
  369. "The reason of SQLFeatureNotSupportedException should be null",
  370. sQLFeatureNotSupportedException.getMessage());
  371. assertEquals(
  372. "The error code of SQLFeatureNotSupportedException should be 0",
  373. sQLFeatureNotSupportedException.getErrorCode(), 0);
  374. assertNull(
  375. "The cause of SQLFeatureNotSupportedException should be null",
  376. sQLFeatureNotSupportedException.getCause());
  377. }
  378. /**
  379. * @test java.sql.SQLFeatureNotSupportedException(String, Throwable)
  380. */
  381. public void test_Constructor_LStringLThrowable() {
  382. Throwable cause = new Exception("MYTHROWABLE");
  383. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  384. "MYTESTSTRING", cause);
  385. assertNotNull(sQLFeatureNotSupportedException);
  386. assertEquals(
  387. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  388. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  389. assertNull(
  390. "The SQLState of SQLFeatureNotSupportedException should be null",
  391. sQLFeatureNotSupportedException.getSQLState());
  392. assertEquals(
  393. "The error code of SQLFeatureNotSupportedException should be 0",
  394. sQLFeatureNotSupportedException.getErrorCode(), 0);
  395. assertEquals(
  396. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  397. cause, sQLFeatureNotSupportedException.getCause());
  398. }
  399. /**
  400. * @test java.sql.SQLFeatureNotSupportedException(String, Throwable)
  401. */
  402. public void test_Constructor_LStringLThrowable_1() {
  403. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  404. "MYTESTSTRING", (Throwable) null);
  405. assertNotNull(sQLFeatureNotSupportedException);
  406. assertEquals(
  407. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  408. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  409. assertNull(
  410. "The SQLState of SQLFeatureNotSupportedException should be null",
  411. sQLFeatureNotSupportedException.getSQLState());
  412. assertEquals(
  413. "The error code of SQLFeatureNotSupportedException should be 0",
  414. sQLFeatureNotSupportedException.getErrorCode(), 0);
  415. assertNull(
  416. "The cause of SQLFeatureNotSupportedException should be null",
  417. sQLFeatureNotSupportedException.getCause());
  418. }
  419. /**
  420. * @test java.sql.SQLFeatureNotSupportedException(String, Throwable)
  421. */
  422. public void test_Constructor_LStringLThrowable_2() {
  423. Throwable cause = new Exception("MYTHROWABLE");
  424. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  425. null, cause);
  426. assertNotNull(sQLFeatureNotSupportedException);
  427. assertNull(
  428. "The reason of SQLFeatureNotSupportedException should be null",
  429. sQLFeatureNotSupportedException.getMessage());
  430. assertNull(
  431. "The SQLState of SQLFeatureNotSupportedException should be null",
  432. sQLFeatureNotSupportedException.getSQLState());
  433. assertEquals(
  434. "The error code of SQLFeatureNotSupportedException should be 0",
  435. sQLFeatureNotSupportedException.getErrorCode(), 0);
  436. }
  437. /**
  438. * @test java.sql.SQLFeatureNotSupportedException(String, Throwable)
  439. */
  440. public void test_Constructor_LStringLThrowable_3() {
  441. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  442. (String) null, (Throwable) null);
  443. assertNotNull(sQLFeatureNotSupportedException);
  444. assertNull(
  445. "The SQLState of SQLFeatureNotSupportedException should be null",
  446. sQLFeatureNotSupportedException.getSQLState());
  447. assertNull(
  448. "The reason of SQLFeatureNotSupportedException should be null",
  449. sQLFeatureNotSupportedException.getMessage());
  450. assertEquals(
  451. "The error code of SQLFeatureNotSupportedException should be 0",
  452. sQLFeatureNotSupportedException.getErrorCode(), 0);
  453. assertNull(
  454. "The cause of SQLFeatureNotSupportedException should be null",
  455. sQLFeatureNotSupportedException.getCause());
  456. }
  457. /**
  458. * @test java.sql.SQLFeatureNotSupportedException(String, String, Throwable)
  459. */
  460. public void test_Constructor_LStringLStringLThrowable() {
  461. Throwable cause = new Exception("MYTHROWABLE");
  462. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  463. "MYTESTSTRING1", "MYTESTSTRING2", cause);
  464. assertNotNull(sQLFeatureNotSupportedException);
  465. assertEquals(
  466. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  467. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  468. assertEquals(
  469. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  470. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  471. assertEquals(
  472. "The error code of SQLFeatureNotSupportedException should be 0",
  473. sQLFeatureNotSupportedException.getErrorCode(), 0);
  474. assertEquals(
  475. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  476. cause, sQLFeatureNotSupportedException.getCause());
  477. }
  478. /**
  479. * @test java.sql.SQLFeatureNotSupportedException(String, String, Throwable)
  480. */
  481. public void test_Constructor_LStringLStringLThrowable_1() {
  482. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  483. "MYTESTSTRING1", "MYTESTSTRING2", null);
  484. assertNotNull(sQLFeatureNotSupportedException);
  485. assertEquals(
  486. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  487. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  488. assertEquals(
  489. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  490. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  491. assertEquals(
  492. "The error code of SQLFeatureNotSupportedException should be 0",
  493. sQLFeatureNotSupportedException.getErrorCode(), 0);
  494. assertNull(
  495. "The cause of SQLFeatureNotSupportedException should be null",
  496. sQLFeatureNotSupportedException.getCause());
  497. }
  498. /**
  499. * @test java.sql.SQLFeatureNotSupportedException(String, String, Throwable)
  500. */
  501. public void test_Constructor_LStringLStringLThrowable_2() {
  502. Throwable cause = new Exception("MYTHROWABLE");
  503. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  504. "MYTESTSTRING", null, cause);
  505. assertNotNull(sQLFeatureNotSupportedException);
  506. assertNull(
  507. "The SQLState of SQLFeatureNotSupportedException should be null",
  508. sQLFeatureNotSupportedException.getSQLState());
  509. assertEquals(
  510. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  511. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  512. assertEquals(
  513. "The error code of SQLFeatureNotSupportedException should be 0",
  514. sQLFeatureNotSupportedException.getErrorCode(), 0);
  515. assertEquals(
  516. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  517. cause, sQLFeatureNotSupportedException.getCause());
  518. }
  519. /**
  520. * @test java.sql.SQLFeatureNotSupportedException(String, String, Throwable)
  521. */
  522. public void test_Constructor_LStringLStringLThrowable_3() {
  523. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  524. "MYTESTSTRING", null, null);
  525. assertNotNull(sQLFeatureNotSupportedException);
  526. assertNull(
  527. "The SQLState of SQLFeatureNotSupportedException should be null",
  528. sQLFeatureNotSupportedException.getSQLState());
  529. assertEquals(
  530. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  531. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  532. assertEquals(
  533. "The error code of SQLFeatureNotSupportedException should be 0",
  534. sQLFeatureNotSupportedException.getErrorCode(), 0);
  535. assertNull(
  536. "The cause of SQLFeatureNotSupportedException should be null",
  537. sQLFeatureNotSupportedException.getCause());
  538. }
  539. /**
  540. * @test java.sql.SQLFeatureNotSupportedException(String, String, Throwable)
  541. */
  542. public void test_Constructor_LStringLStringLThrowable_4() {
  543. Throwable cause = new Exception("MYTHROWABLE");
  544. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  545. null, "MYTESTSTRING", cause);
  546. assertNotNull(sQLFeatureNotSupportedException);
  547. assertEquals(
  548. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  549. "MYTESTSTRING", sQLFeatureNotSupportedException.getSQLState());
  550. assertNull(
  551. "The reason of SQLFeatureNotSupportedException should be null",
  552. sQLFeatureNotSupportedException.getMessage());
  553. assertEquals(
  554. "The error code of SQLFeatureNotSupportedException should be 0",
  555. sQLFeatureNotSupportedException.getErrorCode(), 0);
  556. assertEquals(
  557. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  558. cause, sQLFeatureNotSupportedException.getCause());
  559. }
  560. /**
  561. * @test java.sql.SQLFeatureNotSupportedException(String, String, Throwable)
  562. */
  563. public void test_Constructor_LStringLStringLThrowable_5() {
  564. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  565. null, "MYTESTSTRING", null);
  566. assertNotNull(sQLFeatureNotSupportedException);
  567. assertEquals(
  568. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  569. "MYTESTSTRING", sQLFeatureNotSupportedException.getSQLState());
  570. assertNull(
  571. "The reason of SQLFeatureNotSupportedException should be null",
  572. sQLFeatureNotSupportedException.getMessage());
  573. assertEquals(
  574. "The error code of SQLFeatureNotSupportedException should be 0",
  575. sQLFeatureNotSupportedException.getErrorCode(), 0);
  576. assertNull(
  577. "The cause of SQLFeatureNotSupportedException should be null",
  578. sQLFeatureNotSupportedException.getCause());
  579. }
  580. /**
  581. * @test java.sql.SQLFeatureNotSupportedException(String, String, Throwable)
  582. */
  583. public void test_Constructor_LStringLStringLThrowable_6() {
  584. Throwable cause = new Exception("MYTHROWABLE");
  585. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  586. null, null, cause);
  587. assertNotNull(sQLFeatureNotSupportedException);
  588. assertNull(
  589. "The SQLState of SQLFeatureNotSupportedException should be null",
  590. sQLFeatureNotSupportedException.getSQLState());
  591. assertNull(
  592. "The reason of SQLFeatureNotSupportedException should be null",
  593. sQLFeatureNotSupportedException.getMessage());
  594. assertEquals(
  595. "The error code of SQLFeatureNotSupportedException should be 0",
  596. sQLFeatureNotSupportedException.getErrorCode(), 0);
  597. assertEquals(
  598. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  599. cause, sQLFeatureNotSupportedException.getCause());
  600. }
  601. /**
  602. * @test java.sql.SQLFeatureNotSupportedException(String, String, Throwable)
  603. */
  604. public void test_Constructor_LStringLStringLThrowable_7() {
  605. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  606. null, null, null);
  607. assertNotNull(sQLFeatureNotSupportedException);
  608. assertNull(
  609. "The SQLState of SQLFeatureNotSupportedException should be null",
  610. sQLFeatureNotSupportedException.getSQLState());
  611. assertNull(
  612. "The reason of SQLFeatureNotSupportedException should be null",
  613. sQLFeatureNotSupportedException.getMessage());
  614. assertEquals(
  615. "The error code of SQLFeatureNotSupportedException should be 0",
  616. sQLFeatureNotSupportedException.getErrorCode(), 0);
  617. assertNull(
  618. "The cause of SQLFeatureNotSupportedException should be null",
  619. sQLFeatureNotSupportedException.getCause());
  620. }
  621. /**
  622. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  623. * Throwable)
  624. */
  625. public void test_Constructor_LStringLStringILThrowable() {
  626. Throwable cause = new Exception("MYTHROWABLE");
  627. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  628. "MYTESTSTRING1", "MYTESTSTRING2", 1, cause);
  629. assertNotNull(sQLFeatureNotSupportedException);
  630. assertEquals(
  631. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  632. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  633. assertEquals(
  634. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  635. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  636. assertEquals(
  637. "The error code of SQLFeatureNotSupportedException should be 1",
  638. sQLFeatureNotSupportedException.getErrorCode(), 1);
  639. assertEquals(
  640. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  641. cause, sQLFeatureNotSupportedException.getCause());
  642. }
  643. /**
  644. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  645. * Throwable)
  646. */
  647. public void test_Constructor_LStringLStringILThrowable_1() {
  648. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  649. "MYTESTSTRING1", "MYTESTSTRING2", 1, null);
  650. assertNotNull(sQLFeatureNotSupportedException);
  651. assertEquals(
  652. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  653. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  654. assertEquals(
  655. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  656. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  657. assertEquals(
  658. "The error code of SQLFeatureNotSupportedException should be 1",
  659. sQLFeatureNotSupportedException.getErrorCode(), 1);
  660. assertNull(
  661. "The cause of SQLFeatureNotSupportedException should be null",
  662. sQLFeatureNotSupportedException.getCause());
  663. }
  664. /**
  665. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  666. * Throwable)
  667. */
  668. public void test_Constructor_LStringLStringILThrowable_2() {
  669. Throwable cause = new Exception("MYTHROWABLE");
  670. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  671. "MYTESTSTRING1", "MYTESTSTRING2", 0, cause);
  672. assertNotNull(sQLFeatureNotSupportedException);
  673. assertEquals(
  674. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  675. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  676. assertEquals(
  677. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  678. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  679. assertEquals(
  680. "The error code of SQLFeatureNotSupportedException should be 0",
  681. sQLFeatureNotSupportedException.getErrorCode(), 0);
  682. assertEquals(
  683. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  684. cause, sQLFeatureNotSupportedException.getCause());
  685. }
  686. /**
  687. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  688. * Throwable)
  689. */
  690. public void test_Constructor_LStringLStringILThrowable_3() {
  691. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  692. "MYTESTSTRING1", "MYTESTSTRING2", 0, null);
  693. assertNotNull(sQLFeatureNotSupportedException);
  694. assertEquals(
  695. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  696. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  697. assertEquals(
  698. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  699. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  700. assertEquals(
  701. "The error code of SQLFeatureNotSupportedException should be 0",
  702. sQLFeatureNotSupportedException.getErrorCode(), 0);
  703. assertNull(
  704. "The cause of SQLFeatureNotSupportedException should be null",
  705. sQLFeatureNotSupportedException.getCause());
  706. }
  707. /**
  708. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  709. * Throwable)
  710. */
  711. public void test_Constructor_LStringLStringILThrowable_4() {
  712. Throwable cause = new Exception("MYTHROWABLE");
  713. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  714. "MYTESTSTRING1", "MYTESTSTRING2", -1, cause);
  715. assertNotNull(sQLFeatureNotSupportedException);
  716. assertEquals(
  717. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  718. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  719. assertEquals(
  720. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  721. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  722. assertEquals(
  723. "The error code of SQLFeatureNotSupportedException should be -1",
  724. sQLFeatureNotSupportedException.getErrorCode(), -1);
  725. assertEquals(
  726. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  727. cause, sQLFeatureNotSupportedException.getCause());
  728. }
  729. /**
  730. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  731. * Throwable)
  732. */
  733. public void test_Constructor_LStringLStringILThrowable_5() {
  734. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  735. "MYTESTSTRING1", "MYTESTSTRING2", -1, null);
  736. assertNotNull(sQLFeatureNotSupportedException);
  737. assertEquals(
  738. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  739. "MYTESTSTRING2", sQLFeatureNotSupportedException.getSQLState());
  740. assertEquals(
  741. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  742. "MYTESTSTRING1", sQLFeatureNotSupportedException.getMessage());
  743. assertEquals(
  744. "The error code of SQLFeatureNotSupportedException should be -1",
  745. sQLFeatureNotSupportedException.getErrorCode(), -1);
  746. assertNull(
  747. "The cause of SQLFeatureNotSupportedException should be null",
  748. sQLFeatureNotSupportedException.getCause());
  749. }
  750. /**
  751. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  752. * Throwable)
  753. */
  754. public void test_Constructor_LStringLStringILThrowable_6() {
  755. Throwable cause = new Exception("MYTHROWABLE");
  756. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  757. "MYTESTSTRING", null, 1, cause);
  758. assertNotNull(sQLFeatureNotSupportedException);
  759. assertNull(
  760. "The SQLState of SQLFeatureNotSupportedException should be null",
  761. sQLFeatureNotSupportedException.getSQLState());
  762. assertEquals(
  763. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  764. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  765. assertEquals(
  766. "The error code of SQLFeatureNotSupportedException should be 1",
  767. sQLFeatureNotSupportedException.getErrorCode(), 1);
  768. assertEquals(
  769. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  770. cause, sQLFeatureNotSupportedException.getCause());
  771. }
  772. /**
  773. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  774. * Throwable)
  775. */
  776. public void test_Constructor_LStringLStringILThrowable_7() {
  777. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  778. "MYTESTSTRING", null, 1, null);
  779. assertNotNull(sQLFeatureNotSupportedException);
  780. assertNotNull(sQLFeatureNotSupportedException);
  781. assertNull(
  782. "The SQLState of SQLFeatureNotSupportedException should be null",
  783. sQLFeatureNotSupportedException.getSQLState());
  784. assertEquals(
  785. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  786. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  787. assertEquals(
  788. "The error code of SQLFeatureNotSupportedException should be 1",
  789. sQLFeatureNotSupportedException.getErrorCode(), 1);
  790. assertNull(
  791. "The cause of SQLFeatureNotSupportedException should be null",
  792. sQLFeatureNotSupportedException.getCause());
  793. }
  794. /**
  795. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  796. * Throwable)
  797. */
  798. public void test_Constructor_LStringLStringILThrowable_8() {
  799. Throwable cause = new Exception("MYTHROWABLE");
  800. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  801. "MYTESTSTRING", null, 0, cause);
  802. assertNotNull(sQLFeatureNotSupportedException);
  803. assertNull(
  804. "The SQLState of SQLFeatureNotSupportedException should be null",
  805. sQLFeatureNotSupportedException.getSQLState());
  806. assertEquals(
  807. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  808. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  809. assertEquals(
  810. "The error code of SQLFeatureNotSupportedException should be 0",
  811. sQLFeatureNotSupportedException.getErrorCode(), 0);
  812. assertEquals(
  813. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  814. cause, sQLFeatureNotSupportedException.getCause());
  815. }
  816. /**
  817. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  818. * Throwable)
  819. */
  820. public void test_Constructor_LStringLStringILThrowable_9() {
  821. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  822. "MYTESTSTRING", null, 0, null);
  823. assertNotNull(sQLFeatureNotSupportedException);
  824. assertNull(
  825. "The SQLState of SQLFeatureNotSupportedException should be null",
  826. sQLFeatureNotSupportedException.getSQLState());
  827. assertEquals(
  828. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  829. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  830. assertEquals(
  831. "The error code of SQLFeatureNotSupportedException should be 0",
  832. sQLFeatureNotSupportedException.getErrorCode(), 0);
  833. assertNull(
  834. "The cause of SQLFeatureNotSupportedException should be null",
  835. sQLFeatureNotSupportedException.getCause());
  836. }
  837. /**
  838. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  839. * Throwable)
  840. */
  841. public void test_Constructor_LStringLStringILThrowable_10() {
  842. Throwable cause = new Exception("MYTHROWABLE");
  843. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  844. "MYTESTSTRING", null, -1, cause);
  845. assertNotNull(sQLFeatureNotSupportedException);
  846. assertNull(
  847. "The SQLState of SQLFeatureNotSupportedException should be null",
  848. sQLFeatureNotSupportedException.getSQLState());
  849. assertEquals(
  850. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  851. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  852. assertEquals(
  853. "The error code of SQLFeatureNotSupportedException should be -1",
  854. sQLFeatureNotSupportedException.getErrorCode(), -1);
  855. assertEquals(
  856. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  857. cause, sQLFeatureNotSupportedException.getCause());
  858. }
  859. /**
  860. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  861. * Throwable)
  862. */
  863. public void test_Constructor_LStringLStringILThrowable_11() {
  864. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  865. "MYTESTSTRING", null, -1, null);
  866. assertNotNull(sQLFeatureNotSupportedException);
  867. assertNull(
  868. "The SQLState of SQLFeatureNotSupportedException should be null",
  869. sQLFeatureNotSupportedException.getSQLState());
  870. assertEquals(
  871. "The reason of SQLFeatureNotSupportedException set and get should be equivalent",
  872. "MYTESTSTRING", sQLFeatureNotSupportedException.getMessage());
  873. assertEquals(
  874. "The error code of SQLFeatureNotSupportedException should be -1",
  875. sQLFeatureNotSupportedException.getErrorCode(), -1);
  876. assertNull(
  877. "The cause of SQLFeatureNotSupportedException should be null",
  878. sQLFeatureNotSupportedException.getCause());
  879. }
  880. /**
  881. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  882. * Throwable)
  883. */
  884. public void test_Constructor_LStringLStringILThrowable_12() {
  885. Throwable cause = new Exception("MYTHROWABLE");
  886. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  887. null, "MYTESTSTRING", 1, cause);
  888. assertNotNull(sQLFeatureNotSupportedException);
  889. assertEquals(
  890. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  891. "MYTESTSTRING", sQLFeatureNotSupportedException.getSQLState());
  892. assertNull(
  893. "The reason of SQLFeatureNotSupportedException should be null",
  894. sQLFeatureNotSupportedException.getMessage());
  895. assertEquals(
  896. "The error code of SQLFeatureNotSupportedException should be 1",
  897. sQLFeatureNotSupportedException.getErrorCode(), 1);
  898. assertEquals(
  899. "The cause of SQLFeatureNotSupportedException set and get should be equivalent",
  900. cause, sQLFeatureNotSupportedException.getCause());
  901. }
  902. /**
  903. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  904. * Throwable)
  905. */
  906. public void test_Constructor_LStringLStringILThrowable_13() {
  907. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  908. null, "MYTESTSTRING", 1, null);
  909. assertNotNull(sQLFeatureNotSupportedException);
  910. assertEquals(
  911. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  912. "MYTESTSTRING", sQLFeatureNotSupportedException.getSQLState());
  913. assertNull(
  914. "The reason of SQLFeatureNotSupportedException should be null",
  915. sQLFeatureNotSupportedException.getMessage());
  916. assertEquals(
  917. "The error code of SQLFeatureNotSupportedException should be 1",
  918. sQLFeatureNotSupportedException.getErrorCode(), 1);
  919. assertNull(
  920. "The cause of SQLFeatureNotSupportedException should be null",
  921. sQLFeatureNotSupportedException.getCause());
  922. }
  923. /**
  924. * @test java.sql.SQLFeatureNotSupportedException(String, String, int,
  925. * Throwable)
  926. */
  927. public void test_Constructor_LStringLStringILThrowable_14() {
  928. Throwable cause = new Exception("MYTHROWABLE");
  929. SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
  930. null, "MYTESTSTRING", 0, cause);
  931. assertNotNull(sQLFeatureNotSupportedException);
  932. assertEquals(
  933. "The SQLState of SQLFeatureNotSupportedException set and get should be equivalent",
  934. "MYTESTSTRING", sQLFeatureNotSupportedException.getSQLState());
  935. assertNull(
  936. "The reason of SQLFeatureNotSupportedException should be null",
  937. sQLFeatureNotSupportedException.getMessage());
  938. assertEquals(
  939. "The error code of SQLFeat