import org.junit.Test;
import org.junit.Ignore;

import static org.junit.Assert.assertEquals;

public class TriangleTest {


    @Test
    public void equilateralTriangleHaveEqualSides() throws Exception {
        Triangle triangle = new Triangle(2, 2, 2);

        assertEquals(TriangleKind.EQUILATERAL, triangle.getKind());
    }

    @Ignore
    @Test
    public void largerEquilateralTrianglesAlsoHaveEqualSides() throws Exception {
        Triangle triangle = new Triangle(10, 10, 10);

        assertEquals(TriangleKind.EQUILATERAL, triangle.getKind());
    }

    @Ignore
    @Test
    public void isoscelesTrianglesHaveLastTwoSidesEqual() throws Exception {
        Triangle triangle = new Triangle(3, 4, 4);

        assertEquals(TriangleKind.ISOSCELES, triangle.getKind());
    }

    @Ignore
    @Test
    public void isoscelesTrianglesHaveFirstAndLastSidesEqual() throws Exception {
        Triangle triangle = new Triangle(4, 3, 4);

        assertEquals(TriangleKind.ISOSCELES, triangle.getKind());
    }

    @Ignore
    @Test
    public void isoscelesTrianglesHaveTwoFirstSidesEqual() throws Exception {
        Triangle triangle = new Triangle(4, 4, 3);

        assertEquals(TriangleKind.ISOSCELES, triangle.getKind());
    }

    @Ignore
    @Test
    public void isoscelesTrianglesHaveInFactExactlyTwoSidesEqual() throws Exception {
        Triangle triangle = new Triangle(10, 10, 2);

        assertEquals(TriangleKind.ISOSCELES, triangle.getKind());
    }

    @Ignore
    @Test
    public void scaleneTrianglesHaveNoEqualSides() throws Exception {
        Triangle triangle = new Triangle(3, 4, 5);

        assertEquals(TriangleKind.SCALENE, triangle.getKind());
    }

    @Ignore
    @Test
    public void scaleneTrianglesHaveNoEqualSidesAtLargerScaleEither() throws Exception {
        Triangle triangle = new Triangle(10, 11, 12);

        assertEquals(TriangleKind.SCALENE, triangle.getKind());
    }

    @Ignore
    @Test
    public void scaleneTrianglesHaveNoEqualSidesInDescendingOrderEither() throws Exception {
        Triangle triangle = new Triangle(5, 4, 2);

        assertEquals(TriangleKind.SCALENE, triangle.getKind());
    }

    @Ignore
    @Test
    public void verySmallTrianglesAreLegal() throws Exception {
        Triangle triangle = new Triangle(0.4, 0.6, 0.3);

        assertEquals(TriangleKind.SCALENE, triangle.getKind());
    }

    @Ignore
    @Test(expected = TriangleException.class)
    public void trianglesWithNoSizeAreIllegal() throws Exception {
        new Triangle(0, 0, 0);
    }

    @Ignore
    @Test(expected = TriangleException.class)
    public void trianglesWithNegativeSidesAreIllegal() throws Exception {
        new Triangle(3, 4, -5);
    }

    @Ignore
    @Test(expected = TriangleException.class)
    public void trianglesViolatingTriangleInequalityAreIllegal() throws Exception {
        new Triangle(1, 1, 3);
    }

    @Ignore
    @Test(expected = TriangleException.class)
    public void trianglesViolatingTriangleInequalityAreIllegal2() throws Exception {
        new Triangle(2, 4, 2);
    }

    @Ignore
    @Test(expected = TriangleException.class)
    public void trianglesViolatingTriangleInequalityAreIllegal3() throws Exception {
        new Triangle(7, 3, 2);
    }
}

@@ -40,16 +40,52 @@
 .Ignore;
+%0Aimport org.junit.rules.TestWatcher;
 %0A%0Aimport
@@ -153,16 +153,95 @@
 Test %7B%0A%0A
+    @Rule%0A    public final ExpectedException thrown = ExpectedException.none();
 %0A    @Te
@@ -2518,45 +2518,9 @@
 Test
-(expected = TriangleException.class)
 %0A
+
     
@@ -2574,32 +2574,80 @@
 ows Exception %7B%0A
+        thrown.expect(TriangleException.class);%0A
         new Tria
@@ -2693,44 +2693,8 @@
 Test
-(expected = TriangleException.class)
 %0A   
@@ -2756,32 +2756,80 @@
 ows Exception %7B%0A
+        thrown.expect(TriangleException.class);%0A
         new Tria
@@ -2876,44 +2876,8 @@
 Test
-(expected = TriangleException.class)
 %0A   
@@ -2949,32 +2949,80 @@
 ows Exception %7B%0A
+        thrown.expect(TriangleException.class);%0A
         new Tria
@@ -3068,44 +3068,8 @@
 Test
-(expected = TriangleException.class)
 %0A   
@@ -3142,32 +3142,80 @@
 ows Exception %7B%0A
+        thrown.expect(TriangleException.class);%0A
         new Tria
@@ -3261,44 +3261,8 @@
 Test
-(expected = TriangleException.class)
 %0A   
@@ -3335,32 +3335,80 @@
 ows Exception %7B%0A
+        thrown.expect(TriangleException.class);%0A
         new Tria

Change JUnit @Test expected parameter with ExpectedException @Rule in triangle exercise [Fix #268]