Skip to content
Snippets Groups Projects
Commit dbd64934 authored by jez04's avatar jez04
Browse files

Auto stash before rebase of "solution" onto "master"

parent 90ab5527
No related merge requests found
......@@ -14,25 +14,38 @@ class ClassStructureTest {
StructureHelper helper = StructureHelper.getInstance(ClassStructureTest.class);
// @formatting:off
// @formatter:off
@ParameterizedTest
@CsvSource({
".*\\.java,@Entity,2",
".*\\.java,@OneToMany\\(mappedBy,1",
".*\\.java,@ManyToOne,1",
".*\\.java,@Id,2",
".*\\.java,@GeneratedValue,2",
".*\\.java,Persistence\\.createEntityManagerFactory,1",
".*\\.java,emf.createEntityManager,1",
".*\\.java,\\.persist\\(,1",
".*\\.java,\\.getTransaction\\(\\),1",
".*\\.java,.begin\\(\\),1",
".*\\.java,.commit\\(\\),1",
})
// @formatting:on
void anotaceTest(String file, String annotation, int count) throws URISyntaxException {
assertThat(TextFileContains.getProjectRoot(getClass()),
new TextFileContains(file, annotation).useRegExpForName(true).count(count));
"Bullet.java,serialVersionUID",
"Bullet.java,@Serial",
"BulletAnimated.java,serialVersionUID",
"BulletAnimated.java,@Serial",
"Cannon.java,serialVersionUID",
"Cannon.java,@Serial",
"Ufo.java,serialVersionUID",
"Ufo.java,@Serial",
"MyPoint.java,serialVersionUID",
"MyPoint.java,@Serial",
"WorldEntity.java,serialVersionUID",
"WorldEntity.java,@Serial",
"WorldEntity.java,transient",
"BulletAnimated.java,transient",
"World.java,new ServerSocket",
"World.java,Socket",
"World.java,accept",
"World.java,ObjectOutputStream",
"World.java,writeObject",
"World.java,new Socket",
"World.java,ObjectInputStream",
"World.java,ObjectInputStream",
"World.java,synchronized",
})
// @formatter:on
void anotaceTest(String file, String annotation) throws URISyntaxException {
assertThat(TextFileContains.getProjectRoot(getClass()), new TextFileContains(file, annotation));
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment