package com.braintreegateway.util;

import de.hybris.bootstrap.annotations.UnitTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;

import static org.junit.Assert.assertEquals;

@UnitTest
@RunWith(MockitoJUnitRunner.class)
public class BraintreeCryptoTest {

    private static final String BRAINTREE_KEY = "BRAINTREE_KEY";
    private static final String BRAINTREE_CHANNEL_NAME = "BRAINTREE_CHANNEL_NAME";

    private static final String HYBRIS_BT = "Hybris_BT";

    @Test
    public void shouldReturnDefaultValueForDecrypt() {
        final String result = BraintreeCrypto.decrypt(BRAINTREE_KEY, BRAINTREE_CHANNEL_NAME);

        assertEquals(HYBRIS_BT, result);
    }

    @Test
    public void shouldReturnDefaultValueForEncrypt() {
        final String result = BraintreeCrypto.encrypt(BRAINTREE_KEY, BRAINTREE_CHANNEL_NAME);

        assertEquals(HYBRIS_BT, result);
    }
}
