s.setSubject(this.phraseFactory
.createNounPhrase("John")); //$NON-NLS-1$
// Create a sentence first
CoordinatedPhraseElement maryAndSusan = new CoordinatedPhraseElement(
this.phraseFactory.createNounPhrase("Mary"), //$NON-NLS-1$
this.phraseFactory.createNounPhrase("Susan")); //$NON-NLS-1$
this.kiss.clearComplements();
s.setVerbPhrase(this.kiss);
s.setObject(maryAndSusan);
s.setFeature(Feature.PROGRESSIVE, true);
s.setFeature(Feature.TENSE,Tense.PAST);
s.addPostModifier(this.inTheRoom);
Assert.assertEquals("John was kissing Mary and Susan in the room", //$NON-NLS-1$
this.realiser.realise(s).getRealisation());
// make the main VP past
this.say.setFeature(Feature.TENSE,Tense.PAST);
Assert.assertEquals("said", this.realiser.realise(this.say) //$NON-NLS-1$
.getRealisation());
// now add the sentence as complement of "say". Should make the sentence
// subordinate
// note that sentential punctuation is suppressed
this.say.addComplement(s);
Assert.assertEquals(
"said that John was kissing Mary and Susan in the room", //$NON-NLS-1$
this.realiser.realise(this.say).getRealisation());
// add a postModifier to the main VP
// yields [says [that John was kissing Mary and Susan in the room]
// [behind the curtain]]
this.say.addPostModifier(this.behindTheCurtain);
Assert
.assertEquals(
"said that John was kissing Mary and Susan in the room behind the curtain", //$NON-NLS-1$
this.realiser.realise(this.say).getRealisation());
// create a new sentential complement
PhraseElement s2 = this.phraseFactory.createClause(this.phraseFactory
.createNounPhrase("all"), //$NON-NLS-1$
"be", //$NON-NLS-1$
this.phraseFactory.createAdjectivePhrase("fine")); //$NON-NLS-1$
s2.setFeature(Feature.TENSE,Tense.FUTURE);
Assert.assertEquals("all will be fine", this.realiser.realise(s2) //$NON-NLS-1$
.getRealisation());
// add the new complement to the VP
// yields [said [that John was kissing Mary and Susan in the room and
// all will be fine] [behind the curtain]]
CoordinatedPhraseElement s3 = new CoordinatedPhraseElement(s, s2);
this.say.clearComplements();
this.say.addComplement(s3);
// first with outer complementiser suppressed
s3.setFeature(Feature.SUPRESSED_COMPLEMENTISER, true);
Assert.assertEquals(
"said that John was kissing Mary and Susan in the room " //$NON-NLS-1$
+ "and all will be fine behind the curtain", //$NON-NLS-1$
this.realiser.realise(this.say).getRealisation());
setUp();
s = this.phraseFactory.createClause();
s.setSubject(this.phraseFactory
.createNounPhrase("John")); //$NON-NLS-1$
// Create a sentence first
maryAndSusan = new CoordinatedPhraseElement(
this.phraseFactory.createNounPhrase("Mary"), //$NON-NLS-1$
this.phraseFactory.createNounPhrase("Susan")); //$NON-NLS-1$
s.setVerbPhrase(this.kiss);
s.setObject(maryAndSusan);
s.setFeature(Feature.PROGRESSIVE, true);
s.setFeature(Feature.TENSE,Tense.PAST);
s.addPostModifier(this.inTheRoom);
s2 = this.phraseFactory.createClause(this.phraseFactory
.createNounPhrase("all"), //$NON-NLS-1$
"be", //$NON-NLS-1$
this.phraseFactory.createAdjectivePhrase("fine")); //$NON-NLS-1$
s2.setFeature(Feature.TENSE,Tense.FUTURE);
// then with complementiser not suppressed and not aggregated
s3 = new CoordinatedPhraseElement(s, s2);
this.say.addComplement(s3);
this.say.setFeature(Feature.TENSE,Tense.PAST);
this.say.addPostModifier(this.behindTheCurtain);
Assert.assertEquals(