You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AssertionsEnabledTest.java 488B

123456789101112131415161718192021
  1. package com.vaadin.tests.server;
  2. import static org.junit.Assert.assertTrue;
  3. import org.junit.Test;
  4. public class AssertionsEnabledTest {
  5. @Test
  6. public void testAssertionsEnabled() {
  7. boolean assertFailed = false;
  8. try {
  9. assert false;
  10. } catch (AssertionError e) {
  11. assertFailed = true;
  12. } finally {
  13. assertTrue("Unit tests should be run with assertions enabled",
  14. assertFailed);
  15. }
  16. }
  17. }