コード例 #1
0
  @Before
  public void setUp() {
    Casing front = new Casing();
    front.addDefect(new Defect(Type.MINOR));
    front.addDefect(new Defect(Type.MAJOR));
    front.addDefect(new Defect(Type.MASSIVE));

    Casing rear = new Casing();

    Hinge hinge = new Hinge();
    hinge.addDefect(new Defect(Type.MINOR));
    hinge.addDefect(new Defect(Type.MASSIVE));

    Widget widget = new Widget();
    widget.addDefect(new Defect(Type.MINOR));
    List<Widget> widgets = new ArrayList<Widget>();
    widgets.add(widget);
    widget = new Widget();
    widget.addDefect(new Defect(Type.MINOR));
    widgets.add(widget);
    widget = new Widget();
    widget.addDefect(new Defect(Type.MAJOR));
    widgets.add(widget);
    widgets.add(new Widget());
    widgets.add(new Widget());

    sut = new Frill(widgets, front, rear, hinge);
  }
コード例 #2
0
 @Test
 public void testTierIncompleteRearCasing() {
   Casing c = sut.getRearCasing();
   c.addDefect(new Defect(Type.INCOMPLETE));
   assertThat(sut.calculateTier(), is(equalTo(Tier.INCOMPLETE)));
 }
コード例 #3
0
ファイル: Well.java プロジェクト: p0ma/DecisionSupportSystem
 public Object getValue() {
   return (Double) (casing.getHeight() * casing.getWidth());
 }