package com.atlassian.bitbucket.mesh.git.ref;

import org.junit.Test;

import static org.junit.Assert.*;

public class ProposedRefUpdateTest {

    @Test
    public void testEmptyOldHashIsIllegal() {
        assertThrows(IllegalArgumentException.class,
                () -> ProposedRefUpdate.of("refs/heads/added", "", "0a943a29376f2336b78312d99e65da17048951db"));
    }

    @Test
    public void testEmptyNewHashIsIllegal() {
        assertThrows(IllegalArgumentException.class, () ->
                ProposedRefUpdate.of("refs/heads/basic_branching", "d6edcbf924697ab811a867421dab60d954ccad99", ""));
    }
}