isFatal() public method

public isFatal ( ) : bool
return bool
Example #1
0
 public void test_XMLError_create_C()
 {
     XMLError error = new  XMLError();
       assertTrue( error != null );
       assertTrue( error.isInfo() == false );
       assertTrue( error.isWarning() == false );
       assertTrue( error.isError() == false );
       assertTrue( error.isFatal() == true );
       error = null;
       error = new  XMLError(12345, "My message");
       assertTrue( (  "My message" != error.getMessage() ) == false );
       assertTrue( error.getErrorId() == 12345 );
       error = null;
 }
Example #2
0
 public void test_XMLError_create()
 {
     XMLError error = new XMLError();
       assertTrue( error != null );
       error = null;
       error = new XMLError(libsbml.DuplicateXMLAttribute);
       assertTrue( error.getErrorId() == libsbml.DuplicateXMLAttribute );
       assertTrue( error.getSeverity() == libsbml.LIBSBML_SEV_ERROR );
       assertTrue( error.getSeverityAsString() ==  "Error"  );
       assertTrue( error.getCategory() == libsbml.LIBSBML_CAT_XML );
       assertTrue( error.getCategoryAsString() ==  "XML content" );
       assertTrue( error.getMessage() ==  "Duplicate XML attribute."  );
       assertTrue( error.getShortMessage() ==  "Duplicate attribute"  );
       error = null;
       error = new XMLError(12345, "My message");
       assertTrue( error.getErrorId() == 12345 );
       assertTrue( error.getMessage() ==  "My message"  );
       assertTrue( error.getSeverity() == libsbml.LIBSBML_SEV_FATAL );
       assertTrue( error.getSeverityAsString() ==  "Fatal"  );
       assertTrue( error.getCategory() == libsbml.LIBSBML_CAT_INTERNAL );
       assertTrue( error.getCategoryAsString() ==  "Internal" );
       error = null;
       error = new XMLError(12345, "My message",0,0,libsbml.LIBSBML_SEV_INFO,libsbml.LIBSBML_CAT_SYSTEM);
       assertTrue( error.getErrorId() == 12345 );
       assertTrue( error.getMessage() ==  "My message"  );
       assertTrue( error.getSeverity() == libsbml.LIBSBML_SEV_INFO );
       assertTrue( error.getSeverityAsString() ==  "Informational"  );
       assertTrue( error.getCategory() == libsbml.LIBSBML_CAT_SYSTEM );
       assertTrue( error.getCategoryAsString() ==  "Operating system" );
       assertEquals( true, error.isInfo() );
       assertEquals( true, error.isSystem() );
       error = null;
       error = new XMLError(10000, "Another message",0,0,libsbml.LIBSBML_SEV_FATAL,libsbml.LIBSBML_CAT_XML);
       assertTrue( error.getErrorId() == 10000 );
       assertTrue( error.getMessage() ==  "Another message"  );
       assertTrue( error.getSeverity() == libsbml.LIBSBML_SEV_FATAL );
       assertTrue( error.getSeverityAsString() ==  "Fatal"  );
       assertTrue( error.getCategory() == libsbml.LIBSBML_CAT_XML );
       assertTrue( error.getCategoryAsString() ==  "XML content" );
       assertEquals( true, error.isFatal() );
       assertEquals( true, error.isXML() );
       error = null;
 }