Package de.ailis.jollada.model

Examples of de.ailis.jollada.model.Contributor


    @Test
    public void testContributor()
    {
        final Asset asset = new Asset();
        final Contributor contributor = new Contributor();
        contributor.setAuthor("it's me");
        asset.getContributors().add(contributor);
        assertEquals(1, asset.getContributors().size());
        asset.getContributors().clear();
        assertEquals(0, asset.getContributors().size());
    }
View Full Code Here


            "R", "S", null)));

        final Asset asset2 = new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T");
        assertTrue(asset.equals(asset2));
        asset2.getContributors().add(new Contributor());
        assertFalse(asset.equals(asset2));
        asset2.getContributors().clear();
        assertTrue(asset.equals(asset2));
        asset2.getKeywords().add("KEYWORD");
        assertFalse(asset.equals(asset2));
View Full Code Here

     */

    @Test
    public void testEmptyConstructor()
    {
        final Contributor contributor = new Contributor();
        assertNull(contributor.getAuthor());
        assertNull(contributor.getAuthorEMail());
        assertNull(contributor.getAuthoringTool());
        assertNull(contributor.getAuthorWebsite());
        assertNull(contributor.getComments());
        assertNull(contributor.getCopyright());
        assertNull(contributor.getSourceData());
    }
View Full Code Here

     */

    @Test
    public void testFullConstructor() throws URISyntaxException
    {
        final Contributor contributor = new Contributor("AUTHOR", "EMAIL",
            new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE"));
        assertEquals("AUTHOR", contributor.getAuthor());
        assertEquals("EMAIL", contributor.getAuthorEMail());
        assertEquals("TOOL", contributor.getAuthoringTool());
        assertEquals(new URI("WEBSITE"), contributor.getAuthorWebsite());
        assertEquals("COMMENTS", contributor.getComments());
        assertEquals("COPYRIGHT", contributor.getCopyright());
        assertEquals(new URI("SOURCE"), contributor.getSourceData());
    }
View Full Code Here

     */

    @Test
    public void testEquals() throws URISyntaxException
    {
        final Contributor contributor = new Contributor("AUTHOR", "EMAIL",
            new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE"));
        assertTrue(contributor.equals(new Contributor("AUTHOR", "EMAIL",
            new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE"))));
        assertTrue(contributor.equals(contributor));
        assertFalse(contributor.equals(null));
        assertFalse(contributor.equals("someOther"));
        assertFalse(contributor.equals(new Contributor("AUTHOR2", "EMAIL",
            new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE"))));
        assertFalse(contributor.equals(new Contributor("AUTHOR", "EMAIL2",
            new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE"))));
        assertFalse(contributor.equals(new Contributor("AUTHOR", "EMAIL",
            new URI("WEBSITE2"), "TOOL", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE"))));
        assertFalse(contributor.equals(new Contributor("AUTHOR", "EMAIL",
            new URI("WEBSITE"), "TOOL2", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE"))));
        assertFalse(contributor.equals(new Contributor("AUTHOR", "EMAIL",
            new URI("WEBSITE"), "TOOL", "COMMENTS2", "COPYRIGHT", new URI(
                "SOURCE"))));
        assertFalse(contributor.equals(new Contributor("AUTHOR", "EMAIL",
            new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT2", new URI(
                "SOURCE"))));
        assertFalse(contributor.equals(new Contributor("AUTHOR", "EMAIL",
            new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE2"))));

        assertFalse(new Contributor(null, "EMAIL", new URI("WEBSITE"), "TOOL",
            "COMMENTS", "COPYRIGHT", new URI("SOURCE")).equals(contributor));
        assertFalse(new Contributor("AUTHOR", null, new URI("WEBSITE"), "TOOL",
            "COMMENTS", "COPYRIGHT", new URI("SOURCE")).equals(contributor));
        assertFalse(new Contributor("AUTHOR", "EMAIL", null, "TOOL",
            "COMMENTS", "COPYRIGHT", new URI("SOURCE")).equals(contributor));
        assertFalse(new Contributor("AUTHOR", "EMAIL", new URI("WEBSITE"),
            null, "COMMENTS", "COPYRIGHT", new URI("SOURCE"))
                .equals(contributor));
        assertFalse(new Contributor("AUTHOR", "EMAIL", new URI("WEBSITE"),
            "TOOL", null, "COPYRIGHT", new URI("SOURCE")).equals(contributor));
        assertFalse(new Contributor("AUTHOR", "EMAIL", new URI("WEBSITE"),
            "TOOL", "COMMENTS", null, new URI("SOURCE")).equals(contributor));
        assertFalse(new Contributor("AUTHOR", "EMAIL", new URI("WEBSITE"),
            "TOOL", "COMMENTS", "COPYRIGHT", null).equals(contributor));


        assertTrue(new Contributor(null, "EMAIL", new URI("WEBSITE"), "TOOL",
            "COMMENTS", "COPYRIGHT", new URI("SOURCE")).equals(new Contributor(
            null, "EMAIL", new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT",
            new URI("SOURCE"))));
        assertTrue(new Contributor("AUTHOR", null, new URI("WEBSITE"), "TOOL",
            "COMMENTS", "COPYRIGHT", new URI("SOURCE")).equals(new Contributor(
            "AUTHOR", null, new URI("WEBSITE"), "TOOL", "COMMENTS",
            "COPYRIGHT", new URI("SOURCE"))));
        assertTrue(new Contributor("AUTHOR", "EMAIL", null, "TOOL", "COMMENTS",
            "COPYRIGHT", new URI("SOURCE")).equals(new Contributor("AUTHOR",
            "EMAIL", null, "TOOL", "COMMENTS", "COPYRIGHT", new URI("SOURCE"))));
        assertTrue(new Contributor("AUTHOR", "EMAIL", new URI("WEBSITE"), null,
            "COMMENTS", "COPYRIGHT", new URI("SOURCE")).equals(new Contributor(
            "AUTHOR", "EMAIL", new URI("WEBSITE"), null, "COMMENTS",
            "COPYRIGHT", new URI("SOURCE"))));
        assertTrue(new Contributor("AUTHOR", "EMAIL", new URI("WEBSITE"),
            "TOOL", null, "COPYRIGHT", new URI("SOURCE"))
                .equals(new Contributor("AUTHOR", "EMAIL", new URI("WEBSITE"),
                    "TOOL", null, "COPYRIGHT", new URI("SOURCE"))));
        assertTrue(new Contributor("AUTHOR", "EMAIL", new URI("WEBSITE"),
            "TOOL", "COMMENTS", null, new URI("SOURCE"))
                .equals(new Contributor("AUTHOR", "EMAIL", new URI("WEBSITE"),
                    "TOOL", "COMMENTS", null, new URI("SOURCE"))));
        assertTrue(new Contributor("AUTHOR", "EMAIL", new URI("WEBSITE"),
            "TOOL", "COMMENTS", "COPYRIGHT", null).equals(new Contributor(
            "AUTHOR", "EMAIL", new URI("WEBSITE"), "TOOL", "COMMENTS",
            "COPYRIGHT", null)));
    }
View Full Code Here

     */

    @Test
    public void testHashCode() throws URISyntaxException
    {
        final Contributor contributor1 = new Contributor("AUTHOR", "EMAIL",
            new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE"));
        final Contributor contributor2 = new Contributor("AUTHOR", "EMAIL",
            new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE"));
        assertEquals(contributor1.hashCode(), contributor2.hashCode());
        assertThat(contributor1.hashCode(), not(new Contributor("AUTHOR2",
            "EMAIL", new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT",
            new URI("SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(), not(new Contributor("AUTHOR",
            "EMAIL2", new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT",
            new URI("SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(), not(new Contributor("AUTHOR",
            "EMAIL", new URI("WEBSITE2"), "TOOL", "COMMENTS", "COPYRIGHT",
            new URI("SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(), not(new Contributor("AUTHOR",
            "EMAIL", new URI("WEBSITE"), "TOOL2", "COMMENTS", "COPYRIGHT",
            new URI("SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(), not(new Contributor("AUTHOR",
            "EMAIL", new URI("WEBSITE"), "TOOL", "COMMENTS2", "COPYRIGHT",
            new URI("SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(), not(new Contributor("AUTHOR",
            "EMAIL", new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT2",
            new URI("SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(), not(new Contributor("AUTHOR",
            "EMAIL", new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT",
            new URI("SOURCE2")).hashCode()));
        assertThat(contributor1.hashCode(), not(new Contributor(null, "EMAIL",
            new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(), not(new Contributor("AUTHOR", null,
            new URI("WEBSITE"), "TOOL", "COMMENTS", "COPYRIGHT", new URI(
                "SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(),
            not(new Contributor("AUTHOR", "EMAIL", null, "TOOL", "COMMENTS",
                "COPYRIGHT", new URI("SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(), not(new Contributor("AUTHOR",
            "EMAIL", new URI("WEBSITE"), null, "COMMENTS", "COPYRIGHT",
            new URI("SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(), not(new Contributor("AUTHOR",
            "EMAIL", new URI("WEBSITE"), "TOOL", null, "COPYRIGHT", new URI(
                "SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(), not(new Contributor("AUTHOR",
            "EMAIL", new URI("WEBSITE"), "TOOL", "COMMENTS", null, new URI(
                "SOURCE")).hashCode()));
        assertThat(contributor1.hashCode(),
            not(new Contributor("AUTHOR", "EMAIL", new URI("WEBSITE"), "TOOL",
                "COMMENTS", "COPYRIGHT", null).hashCode()));
    }
View Full Code Here

    @Test
    public void testToString() throws URISyntaxException
    {
        assertEquals("Contributor [author=AUTHOR, authorEMail=EMAIL, "
            + "authorWebsite=WEBSITE, authoringTool=TOOL, comments=COMMENTS, "
            + "copyright=COPYRIGHT, sourceData=SOURCE]", new Contributor(
            "AUTHOR", "EMAIL", new URI("WEBSITE"), "TOOL", "COMMENTS",
            "COPYRIGHT", new URI("SOURCE")).toString());
    }
View Full Code Here

     */

    @Test
    public void testAuthor()
    {
        final Contributor contributor = new Contributor();
        contributor.setAuthor("AUTHOR");
        assertEquals("AUTHOR", contributor.getAuthor());
    }
View Full Code Here

     */

    @Test
    public void testAuthorEMail()
    {
        final Contributor contributor = new Contributor();
        contributor.setAuthorEMail("EMAIL");
        assertEquals("EMAIL", contributor.getAuthorEMail());
    }
View Full Code Here

     */

    @Test
    public void testAuthoringTool()
    {
        final Contributor contributor = new Contributor();
        contributor.setAuthoringTool("TOOL");
        assertEquals("TOOL", contributor.getAuthoringTool());
    }
View Full Code Here

TOP

Related Classes of de.ailis.jollada.model.Contributor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.