<commit_before>package org.halite;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import org.halite.model.Resource;
import org.junit.Before;
import org.junit.Test;

public class LinkAdapterTest {

    private LinkAdapter subject;

    @Before
    public void setUp() throws Exception {
        this.subject = new LinkAdapter();

    }

    @Test
    public void testLinkAdapterResource() throws Exception {
        final Resource resource = new Resource();
        final LinkAdapter linkAdapter = new LinkAdapter(resource);

        assertNotNull(linkAdapter.getLink());
        assertTrue(resource.getLink().contains(linkAdapter.getLink()));
    }

    @Test
    public void testRel() throws Exception {
        subject.rel("abc");
        assertEquals("abc", subject.getLink().getRel());
    }

    @Test
    public void testHref() throws Exception {
        subject.href("abc");
        assertEquals("abc", subject.getLink().getHref());
    }

    @Test
    public void testHreflang() throws Exception {
        subject.hreflang("abc");
        assertEquals("abc", subject.getLink().getHreflang());
    }

    @Test
    public void testProfile() throws Exception {
        subject.profile("abc");
        assertEquals("abc", subject.getLink().getProfile());
    }

    @Test
    public void testDeprecation() throws Exception {
        subject.deprecation("abc");
        assertEquals("abc", subject.getLink().getDeprecation());
    }

    @Test
    public void testName() throws Exception {
        subject.name("abc");
        assertEquals("abc", subject.getLink().getName());
    }

    @Test
    public void testTemplated() throws Exception {
        subject.templated(true);
        assertTrue(subject.getLink().isTemplated());
        subject.templated(false);
        assertFalse(subject.getLink().isTemplated());
    }

    @Test
    public void testType() throws Exception {
        subject.type("abc");
        assertEquals("abc", subject.getLink().getType());
    }

    @Test
    public void testTitle() throws Exception {
        subject.title("abc");
        assertEquals("abc", subject.getLink().getTitle());
    }

    @Test
    public void testAddTo() throws Exception {
        final Resource resource = new Resource();
        subject.addTo(resource);
        assertTrue(resource.getLink().contains(subject.getLink()));
    }

}<commit_msg>fixed unit test<commit_after>package org.halite;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import org.halite.model.Resource;
import org.junit.Before;
import org.junit.Test;

public class LinkAdapterTest {

    private LinkAdapter subject;

    @Before
    public void setUp() throws Exception {
        this.subject = new LinkAdapter();

    }

    @Test
    public void testLinkAdapterResource() throws Exception {
        final Resource resource = new Resource();
        final LinkAdapter linkAdapter = new LinkAdapter(resource);

        assertNotNull(linkAdapter.getLink());
        assertTrue(resource.getLink().contains(linkAdapter.getLink()));
    }

    @Test
    public void testRel() throws Exception {
        subject.rel("abc");
        assertEquals("abc", subject.getLink().getRel());
    }

    @Test
    public void testHref() throws Exception {
        subject.href("abc");
        assertEquals("abc", subject.getLink().getHref());
    }

    @Test
    public void testHreflang() throws Exception {
        subject.hreflang("abc");
        assertEquals("abc", subject.getLink().getHreflang());
    }

    @Test
    public void testProfile() throws Exception {
        subject.profile("abc");
        assertEquals("abc", subject.getLink().getProfile());
    }

    @Test
    public void testDeprecation() throws Exception {
        subject.deprecation("abc");
        assertEquals("abc", subject.getLink().getDeprecation());
    }

    @Test
    public void testName() throws Exception {
        subject.name("abc");
        assertEquals("abc", subject.getLink().getName());
    }

    @Test
    public void testTemplated() throws Exception {
        subject.templated(true);
        assertTrue(subject.getLink().isTemplated());
        subject.templated(false);
        assertFalse(subject.getLink().isTemplated());
    }

    @Test
    public void testType() throws Exception {
        subject.type("abc");
        assertEquals("abc", subject.getLink().getType());
    }

    @Test
    public void testTitle() throws Exception {
        subject.title("abc");
        assertEquals("abc", subject.getLink().getTitle());
    }

    @Test
    public void testAddTo() throws Exception {
        final Resource resource = new Resource();
        final LinkAdapter la = subject.addTo(resource);
        assertNotNull(la);
        assertEquals(la, subject);
        assertTrue(resource.getLink().contains(subject.getLink()));
    }

}
{'fraction_non_alphanumeric': 0.12566476265511128, 'fraction_numerical': 0.0, 'mean_word_length': 2.9671875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7317929', 'n_tokens_mistral': 1347, 'n_tokens_neox': 1325, 'n_words': 304}