From 74f8a80b5e3300b54a0ce2256a35bd6d1567d487 Mon Sep 17 00:00:00 2001 From: Daniel Cortes Pichardo Date: Tue, 19 Jan 2016 23:51:24 -0600 Subject: [PATCH] MOdel Builder for test --- .../report/mockfactory/MockFactory.java | 21 +++++++++++++++++++ .../poi/builders/ModelObjectBuilderTest.java | 12 +++++++++++ 2 files changed, 33 insertions(+) create mode 100644 dsl-report/src/test/java/com/danimaniarqsoft/report/mockfactory/MockFactory.java create mode 100644 dsl-report/src/test/java/com/danimaniarqsoft/report/poi/builders/ModelObjectBuilderTest.java diff --git a/dsl-report/src/test/java/com/danimaniarqsoft/report/mockfactory/MockFactory.java b/dsl-report/src/test/java/com/danimaniarqsoft/report/mockfactory/MockFactory.java new file mode 100644 index 0000000..d2c32db --- /dev/null +++ b/dsl-report/src/test/java/com/danimaniarqsoft/report/mockfactory/MockFactory.java @@ -0,0 +1,21 @@ +package com.danimaniarqsoft.report.mockfactory; + +import java.util.Date; + +import org.mockito.Mockito; + +import com.danimaniarqsoft.report.model.Persona; + +public class MockFactory { + + private MockFactory() {} + + public static Persona getPersona() { + Persona persona = Mockito.mock(Persona.class); + Mockito.when(persona.getPersona()).thenReturn("Mozart"); + Mockito.when(persona.getCantidad()).thenReturn(23.2d); + Mockito.when(persona.getEdad()).thenReturn(130); + Mockito.when(persona.getFecha()).thenReturn(new Date()); + return persona; + } +} diff --git a/dsl-report/src/test/java/com/danimaniarqsoft/report/poi/builders/ModelObjectBuilderTest.java b/dsl-report/src/test/java/com/danimaniarqsoft/report/poi/builders/ModelObjectBuilderTest.java new file mode 100644 index 0000000..387700e --- /dev/null +++ b/dsl-report/src/test/java/com/danimaniarqsoft/report/poi/builders/ModelObjectBuilderTest.java @@ -0,0 +1,12 @@ +package com.danimaniarqsoft.report.poi.builders; + +import org.testng.annotations.Test; + +public class ModelObjectBuilderTest { + + @Test + public void createModelObject() { +// ModelObjectBuilder.createModelObject(workbook, modelObjectTarget) + throw new RuntimeException("Test not implemented"); + } +}