Skip to content

Commit

Permalink
nueva carpeta data y los test de los datas faltantes
Browse files Browse the repository at this point in the history
  • Loading branch information
yazmin48 committed Dec 27, 2024
1 parent 59d66e5 commit 9893975
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.lacnic;
package net.lacnic.elections.data;

import java.util.ArrayList;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.lacnic;
package net.lacnic.elections.data;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package net.lacnic.elections.data;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

public class TableReportDataStringIdTest extends TestCase {

public TableReportDataStringIdTest(String testName) {
super(testName);
}

/**
* @return the suite of tests being tested
*/
public static Test suite() {
return new TestSuite(TableReportDataStringIdTest.class);
}

public void testTableReportDataStringId() {

String id = "Id10", description = "description";

TableReportDataStringId tableReportData = new TableReportDataStringId(id, description);

assertNotNull(tableReportData);

assertEquals(tableReportData.getId(), id);
assertEquals(tableReportData.getDescription(), description);
}

public void testTableReportDataStringIdSets() {

String id = "Id10", description = "description";

TableReportDataStringId tableReportData = new TableReportDataStringId();

assertNotNull(tableReportData);

tableReportData.setId(id);
tableReportData.setDescription(description);

assertEquals(tableReportData.getId(), id);
assertEquals(tableReportData.getDescription(), description);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package net.lacnic.elections.data;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

public class TablesReportDataLongIdTest extends TestCase {

public TablesReportDataLongIdTest(String testName) {
super(testName);
}

/**
* @return the suite of tests being tested
*/
public static Test suite() {
return new TestSuite(TablesReportDataLongIdTest.class);
}

public void testTablesReportDataLongId() {

long id = 510L;
String description = "description";

TablesReportDataLongId tableReportData = new TablesReportDataLongId(id, description);

assertNotNull(tableReportData);

assertEquals(tableReportData.getId(), id);
assertEquals(tableReportData.getDescription(), description);
}

public void testTablesReportDataLongIdSets() {

long id = 510L;
String description = "description";

TablesReportDataLongId tableReportData = new TablesReportDataLongId();

assertNotNull(tableReportData);

tableReportData.setId(id);
tableReportData.setDescription(description);

assertEquals(tableReportData.getId(), id);
assertEquals(tableReportData.getDescription(), description);
}

}

0 comments on commit 9893975

Please sign in to comment.