

package org.hisp.dhis.android.core.dataset.internal;

import org.hisp.dhis.android.core.data.database.LinkStoreAbstractIntegrationShould;
import org.hisp.dhis.android.core.data.dataset.SectionGreyedFieldsLinkSamples;
import org.hisp.dhis.android.core.dataset.SectionGreyedFieldsLink;
import org.hisp.dhis.android.core.dataset.SectionGreyedFieldsLinkTableInfo;
import org.hisp.dhis.android.core.utils.integration.mock.TestDatabaseAdapterFactory;
import org.hisp.dhis.android.core.utils.runner.D2JunitRunner;
import org.junit.runner.RunWith;

@RunWith(D2JunitRunner.class)
public class SectionGreyedFieldsLinkStoreIntegrationShould
        extends LinkStoreAbstractIntegrationShould<SectionGreyedFieldsLink> {

    public SectionGreyedFieldsLinkStoreIntegrationShould() {
        super(SectionGreyedFieldsLinkStore.create(TestDatabaseAdapterFactory.get()),
                SectionGreyedFieldsLinkTableInfo.TABLE_INFO, TestDatabaseAdapterFactory.get());
    }

    @Override
    protected String addMasterUid() {
        return SectionGreyedFieldsLinkSamples.getSectionGreyedFieldsLink().section();
    }

    @Override
    protected SectionGreyedFieldsLink buildObject() {
        return SectionGreyedFieldsLinkSamples.getSectionGreyedFieldsLink();
    }

    @Override
    protected SectionGreyedFieldsLink buildObjectWithOtherMasterUid() {
        return SectionGreyedFieldsLinkSamples.getSectionGreyedFieldsLink().toBuilder()
                .section("new_section")
                .build();
    }
}