Skip to content

Commit

Permalink
fix: IdCardControleTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolife999 committed Nov 30, 2023
1 parent a123975 commit 6097d5e
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package fr.insee.arc.core.service.p4controle.bo;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.List;

import org.junit.Test;

public class IdCardControleTest {

@Test
public void getReglesControleByControleTypeCode() {

List<RegleControle> reglesControle = new ArrayList<>();
reglesControle.add(new RegleControle(ControleTypeCode.ALPHANUM, null, null, null, null, null, null, 0, null, null));
reglesControle.add(new RegleControle(ControleTypeCode.ALPHANUM, null, null, null, null, null, null, 1, null, null));
reglesControle.add(new RegleControle(ControleTypeCode.CARDINALITE, null, null, null, null, null, null, 2, null, null));
reglesControle.add(new RegleControle(ControleTypeCode.ALPHANUM, null, null, null, null, null, null, 3, null, null));

IdCardControle idCardControle = new IdCardControle(reglesControle);

List<RegleControle> reglesControleALPHANUM = idCardControle.getReglesControle(ControleTypeCode.ALPHANUM);
assertEquals(3, reglesControleALPHANUM.size());

}

}

0 comments on commit 6097d5e

Please sign in to comment.