From eb00e14a8993d6bfefddb21f6acbb45103c6341a Mon Sep 17 00:00:00 2001 From: Hamza Ahmed Khan Date: Tue, 31 Jan 2023 17:07:09 +0500 Subject: [PATCH] Increase test coverage --- .../populateform/ModelTest.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/opensrp-core/src/test/java/org/smartregister/clientandeventmodel/populateform/ModelTest.java b/opensrp-core/src/test/java/org/smartregister/clientandeventmodel/populateform/ModelTest.java index 38b5470d0..1d1a06812 100644 --- a/opensrp-core/src/test/java/org/smartregister/clientandeventmodel/populateform/ModelTest.java +++ b/opensrp-core/src/test/java/org/smartregister/clientandeventmodel/populateform/ModelTest.java @@ -1,17 +1,31 @@ package org.smartregister.clientandeventmodel.populateform; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import org.smartregister.BaseUnitTest; import org.smartregister.clientandeventmodel.populateform.Model; public class ModelTest extends BaseUnitTest { + private Model model; + + @Before + public void setUp() { + model = new Model("tag","openMRSEntity","openMRSEntityId","OpenMRSEntityParent"); + } @Test public void testConstructorNotNull() { - Model model = new Model("","","",""); Assert.assertNotNull(model); } + @Test + public void testFieldMembers() { + Assert.assertEquals("tag", model.getTag()); + Assert.assertEquals("openMRSEntity", model.getOpenMRSEntity()); + Assert.assertEquals("openMRSEntityId", model.getOpenMRSEntityId()); + Assert.assertEquals("OpenMRSEntityParent", model.getOpenMRSEntityParent()); + } + } \ No newline at end of file