29 lines
680 B
Java
29 lines
680 B
Java
package com.alexanderlogistics;
|
|
|
|
import org.junit.Test;
|
|
|
|
import junit.framework.Assert;
|
|
|
|
/**
|
|
* This test generates random test data
|
|
*
|
|
* @author rsoika
|
|
*
|
|
*/
|
|
public class TestPostionsnummernRegex {
|
|
|
|
/**
|
|
* Test positionnummern 'XX-YYY-####-###'
|
|
*/
|
|
@Test
|
|
public void testPutFileToFTP() {
|
|
|
|
Assert.assertTrue("AA-BBC-1234-991".matches(InvoicePlugin.REGEX_POSNUMER));
|
|
Assert.assertFalse("aa-BBC-1234-991".matches(InvoicePlugin.REGEX_POSNUMER));
|
|
Assert.assertFalse("CC-BBC-1234-991 ".matches(InvoicePlugin.REGEX_POSNUMER));
|
|
|
|
Assert.assertTrue("IM-ZEL-2101-005".matches(InvoicePlugin.REGEX_POSNUMER));
|
|
|
|
}
|
|
|
|
}
|