package com.ticketmanor.ui.jsf;

import static org.junit.Assert.*;

import java.time.LocalDateTime;

import org.junit.Before;
import org.junit.Test;

public class LocalDateTimeJsfConverterTest {
	
	LocalDateTimeJsfConverter target;

	final String stringDate = "June 1, 2015 7:30 PM";
	final LocalDateTime localDateTime = LocalDateTime.of(2015, 06, 01, 19, 30, 56, 0);
	
	@Before
	public void setUp() throws Exception {
		target = new LocalDateTimeJsfConverter();
	}

	@Test
	public void testGetAsObject() {
		final Object asObject = target.getAsObject(null, null, stringDate);
		System.out.println(asObject);
	}

	@Test
	public void testGetAsString() {
		final String asString = target.getAsString(null, null, localDateTime);
		System.out.println(asString);
		assertEquals(stringDate, asString);
	}

}

@@ -506,31 +506,48 @@
 %7B%0A%09%09
-final Object asObject =
+LocalDateTime asObject = (LocalDateTime)
  tar
@@ -608,24 +608,139 @@
 println(
-asObject
+%22Converted to LocalDateTime: %22 + asObject);%0A%09%09assertEquals(2015, asObject.getYear());%0A%09%09assertEquals(19, asObject.getHour()
 );%0A%09%7D%0A%0A%09
@@ -872,16 +872,40 @@
 println(
+%22Converted to String%22 + 
 asString
@@ -945,14 +945,13 @@
 tring);%0A
+
 %09%7D%0A
-%0A
 %7D%0A

Add asserts to test method.