public void testCircularInclusion() {
   final JpsArtifact a = addArtifact("a", root());
   final JpsArtifact b = addArtifact("b", root());
   LayoutElementTestUtil.addArtifactToLayout(a, b);
   LayoutElementTestUtil.addArtifactToLayout(b, a);
   assertBuildFailed(a);
   assertBuildFailed(b);
 }
  public void testArtifactContainingSelfIncludingArtifactWithoutOutput() {
    final JpsArtifact a = addArtifact("a", root());
    LayoutElementTestUtil.addArtifactToLayout(a, a);
    final JpsArtifact b = addArtifact("b", root().artifact(a));
    a.setOutputPath(null);

    assertBuildFailed(b);
  }
  public void testArtifactContainingSelfIncludingArtifact() {
    JpsArtifact c = addArtifact("c", root());
    final JpsArtifact a = addArtifact("a", root().artifact(c));
    LayoutElementTestUtil.addArtifactToLayout(a, a);
    final JpsArtifact b = addArtifact("b", root().artifact(a));

    buildArtifacts(c);
    assertBuildFailed(b);
    assertBuildFailed(a);
  }
 public void testSelfIncludingArtifact() {
   final JpsArtifact a = addArtifact("a", root());
   LayoutElementTestUtil.addArtifactToLayout(a, a);
   assertBuildFailed(a);
 }