package com.github.omaru.daymeeting;

import org.junit.Assert;
import org.junit.Test;

public class MeetingUnitTest {
	private Meeting meeting;

	@Test
	public void itShouldOnlyAcceptGreaterThanZeroDurations() {
		meeting = new Meeting();
		try {
			meeting.setDuration(-1);
			Assert.fail("IllegalArgumentException expected");
		} catch (IllegalArgumentException e) {

		}
		try {
			meeting.setDuration(0);
			Assert.fail("IllegalArgumentException expected");
		} catch (IllegalArgumentException e) {

		}
	}
	
	@Test(expected = IllegalArgumentException.class)
	public void itShouldNotLastLongerThanEightHours(){
		meeting = new Meeting();
		meeting.setDuration(61);
		
	}

}
