package com.fhr.withminsta.tests;

import static org.junit.Assert.*;

import org.junit.Test;

import com.fhr.withminsta.core.WithMinMaxStack;

public class WithMinMaxStackTest {

	@Test
	public void test() {
		WithMinMaxStack<Integer> withMinMaxStack=new WithMinMaxStack<>();
		withMinMaxStack.push(1);
		assertEquals((Integer)1, withMinMaxStack.min());
		assertEquals((Integer)1, withMinMaxStack.max());
		withMinMaxStack.push(2);
		assertEquals((Integer)1, withMinMaxStack.min());
		assertEquals((Integer)2, withMinMaxStack.max());
		withMinMaxStack.push(null);
		assertEquals((Integer)1, withMinMaxStack.min());
		assertEquals((Integer)2, withMinMaxStack.max());
	}

}
