Skip to content

Commit

Permalink
Added a test to model checking.
Browse files Browse the repository at this point in the history
Solved some problems.
  • Loading branch information
Doom9527 committed Apr 8, 2024
1 parent 5e3c61c commit 27cc162
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
*/
package com.yahoo.elide.core.utils;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import com.yahoo.elide.annotation.Include;
import org.junit.jupiter.api.Test;

import jakarta.persistence.Entity;

import java.util.Set;

import static org.junit.jupiter.api.Assertions.*;

public class ClassScannerTest {

private final ClassScanner scanner;
Expand Down Expand Up @@ -53,4 +52,11 @@ public void testGetAnyAnnotatedClasses() {
|| cls.isAnnotationPresent(Entity.class));
}
}

@Test
public void testGetAnnotatedClassesNoClassesFound() {
assertThrows(IllegalArgumentException.class, () -> {
scanner.getAnnotatedClasses("nonexistent.package", Include.class);
}, "No annotated classes found in the specified package: nonexistent.package");
}
}

0 comments on commit 27cc162

Please sign in to comment.