package jp.sourceforge.orangesignal.trading.commission;

import static org.junit.Assert.assertTrue;

import org.apache.commons.lang.SerializationUtils;
import org.junit.Test;

public class FreeCommissionTest {

	@Test
	public void testFreeCommission() {
		new FreeCommission();
		assertTrue(true);
	}

	@Test
	public void testCalcCommission() {
		final Commission commission = new FreeCommission();
		assertTrue(commission.calcCommission(10000, 100) == 0D);
	}

	@Test
	public void testSerialization() {
		final byte[] bytes = SerializationUtils.serialize(new FreeCommission());
		assertTrue(true);
		final Object obj = SerializationUtils.deserialize(bytes);
		assertTrue(obj instanceof FreeCommission);
	}

}
