Commits

Anonymous committed 35c9fc7

refs #119 Tests for this bug fix

Comments (0)

Files changed (2)

ca.mcgill.cs.swevo.qualyzer.tests/src/ca/mcgill/cs/swevo/qualyzer/model/validation/CodeValidatorTest.java

 	}
 	
 	/**
+	 * Tests that names with accents actually work.
+	 */
+	@Test 
+	public void testAccents()
+	{
+		CodeValidator lValidator = new CodeValidator("-_  ", fProject);
+		assertTrue(lValidator.isValid());
+		lValidator = new CodeValidator("Pйpй et Mйmй", fProject);
+		assertTrue(lValidator.isValid());
+		lValidator = new CodeValidator("&", fProject);
+		assertFalse(lValidator.isValid());
+		lValidator = new CodeValidator("Tschья", fProject);
+		assertTrue(lValidator.isValid());
+	}
+	
+	/**
 	 * Verifies that the name does not already exist with a old name
 	 */
 	@Test

ca.mcgill.cs.swevo.qualyzer.tests/src/ca/mcgill/cs/swevo/qualyzer/model/validation/ParticipantValidatorTest.java

 	}
 	
 	/**
+	 * Tests that names with accents actually work.
+	 */
+	@Test 
+	public void testAccents()
+	{
+		CodeValidator lValidator = new CodeValidator("-_  ", fProject);
+		assertTrue(lValidator.isValid());
+		lValidator = new CodeValidator("Pйpй et Mйmй", fProject);
+		assertTrue(lValidator.isValid());
+		lValidator = new CodeValidator("&", fProject);
+		assertFalse(lValidator.isValid());
+		lValidator = new CodeValidator("Tschья", fProject);
+		assertTrue(lValidator.isValid());
+	}
+	
+	/**
 	 * Verifies that the ID follows alphanumerical+
 	 */
 	@Test