public void testMissingMissionNameHandling(){
  String xml="";
  xml+="<mission " + "start_id='' >";
  xml+=createEndMissionXml();
  InputStream missionInputStream=new ByteArrayInputStream(xml.getBytes());
  boolean didMissionNameParseFail=false;
  try {
    MissionParser.getMissionName(missionInputStream);
  }
 catch (  MissionParseException e) {
    didMissionNameParseFail=true;
  }
  Assert.assertEquals(true,didMissionNameParseFail);
}

public void testMissingMissionNameHandling ( ) { String xml = "" ; xml += "<mission " + "start_id='' >" ; xml += createEndMissionXml ( ) ; InputStream missionInputStream = new ByteArrayInputStream ( xml . getBytes ( ) ) ; boolean didMissionNameParseFail = false ; try { MissionParser . getMissionName ( missionInputStream ) ; } catch ( MissionParseException e ) { didMissionNameParseFail = true ; } Assert . assertEquals ( true , didMissionNameParseFail ) ; }
test for correct error handling for a mission with no " name " attribute .
