001package edu.pdx.cs.joy.xml;
002
003import edu.pdx.cs.joy.InvokeMainTestCase;
004import org.junit.jupiter.api.Test;
005
006import static org.hamcrest.CoreMatchers.*;
007import static org.hamcrest.MatcherAssert.assertThat;
008
009public class BuildPhonebookTest extends InvokeMainTestCase {
010
011  @Test
012  public void runningMainGenerateXmlAndNoErrors() {
013    MainMethodResult result = invokeMain(BuildPhonebook.class);
014    assertThat(result.getTextWrittenToStandardError(), equalTo(""));
015    assertThat(result.getTextWrittenToStandardOut(), containsString("<name>Tripwire, Inc.</name>"));
016  }
017}