package uk.ac.cam.cl.echo.extrusionfinder.server.parts;

import org.junit.Test;

import static org.junit.Assert.assertTrue;

/**
 * Unit tests for MatchedPart
 *
 * @author as2388
 */
public class MatchedPartTester {

    /**
     * Tests the equals method of MatchedPart
     */
    @Test
    public void testEquals() {
        MatchedPart a = new MatchedPart(new Part("a", "b", "c", "d", "e"), 0.02);

        assertTrue(new MatchedPart(new Part("a", "b", "c", "d", "e"), 0.02).equals(a));

        assertTrue(!new MatchedPart(new Part("A", "b", "c", "d", "e"), 0.02).equals(a));
        assertTrue(!new MatchedPart(new Part("b", "B", "c", "d", "e"), 0.02).equals(a));
        assertTrue(!new MatchedPart(new Part("b", "b", "C", "d", "e"), 0.02).equals(a));
        assertTrue(!new MatchedPart(new Part("b", "b", "c", "D", "e"), 0.02).equals(a));
        assertTrue(!new MatchedPart(new Part("b", "b", "c", "d", "e"), 0.03).equals(a));

        assertTrue(!a.equals(new Object()));
    }
}

@@ -617,25 +617,25 @@
 t(new Part(%22
-b
+a
 %22, %22B%22, %22c%22,
@@ -702,33 +702,33 @@
 dPart(new Part(%22
-b
+a
 %22, %22b%22, %22C%22, %22d%22
@@ -791,33 +791,33 @@
 dPart(new Part(%22
-b
+a
 %22, %22b%22, %22c%22, %22D%22
@@ -888,17 +888,106 @@
 w Part(%22
-b
+a%22, %22b%22, %22c%22, %22d%22, %22E%22), 0.02).equals(a));%0A        assertTrue(!new MatchedPart(new Part(%22a
 %22, %22b%22, 

Add test for "E"