예제 #1
0
  @Test
  public void testBuilderAngusGuitar() {
    GuitarMaker guitarMaker = new GuitarMaker();
    guitarMaker.setGuitarBuilder(new AngusGuitarBuilder());

    guitarMaker.buildGuitar();
    Guitar guitar = guitarMaker.getGuitar();

    assertEquals("SG;mahogany/rosewood;HH", guitar.toString());
  }
예제 #2
0
  @Test
  public void testBuilderStevieGuitar() {
    GuitarMaker guitarMaker = new GuitarMaker();
    guitarMaker.setGuitarBuilder(new SteviesGuitarBuilder());

    guitarMaker.buildGuitar();
    Guitar guitar = guitarMaker.getGuitar();

    assertEquals("Stratocaster;maple/Pau Ferro;SSS", guitar.toString());
  }