package de.renew.formalism.function;

import org.junit.jupiter.api.Test;

import de.renew.unify.Impossible;

import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertSame;

public class ConstantFunctionTest {
    @Test
    public void testConstantFunction() {
        //when
        final ConstantFunction testee = new ConstantFunction(new Object());
        //then
        assertNotNull(testee);
    }

    @Test
    public void testFunction() throws Impossible {
        //given
        final Object constant = new Object();
        final ConstantFunction testee = new ConstantFunction(constant);

        //when
        final Object result = testee.function();

        //then
        assertSame(constant, result);
    }

}