This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>com.approvaltests</groupId> | |
<artifactId>approvaltests</artifactId> | |
<version>19.0.0</version> | |
<scope>test</scope> | |
</dependency> |
Mehr zum Thema Personal Knowledge Management mit Obsidian können Sie hier lesen:
Diese Serie enthält noch keine Artikel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package examples; | |
import static org.assertj.core.api.Assertions.assertThat; | |
import static org.assertj.core.api.Assertions.assertThatThrownBy; | |
import static org.assertj.core.api.Assertions.fail; | |
import static org.junit.jupiter.api.Assertions.assertEquals; | |
import java.util.UUID; | |
import org.apache.commons.lang3.exception.ExceptionUtils; | |
import org.junit.jupiter.api.Assertions; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i: 0 | |
simulating cleanup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SuppressionDemo { | |
// ... | |
public static class BusinessLogic { | |
// Business-Logik, die mit einer Exception fehlschlagen kann | |
private void businessLogicThatThrowsAnException() throws IOException { | |
throw new IOException("exception from main business logic"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Account account = new Account(); | |
account.setName("mmustermann"); | |
final Person person = new Person(); | |
person.setGivenName("Max"); | |
person.setSurname("Mustermann"); | |
account.setPerson(person); | |
final Set<Role> roles = new HashSet<>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('phonePatternValidator', () => { | |
const parameters = [ | |
// valid phone numbers | |
{value: '07541/123456-12', valid: true}, | |
{value: '+49 (0)7541/123456-12', valid: true}, | |
{value: '0049 7541/123456-12', valid: true}, | |
{value: '0754112345612', valid: true}, | |
{value: '0152-123123', valid: true}, | |
{value: '0157 123123', valid: true}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HelloWorld { | |
public static void main (String[] args) { | |
System.out.println("Hello World!"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GetMapping(FIND_SOMETHING_URL) | |
@PreAuthorize("authentication.name == 'admin' or (hasRole('REQUIRED_ROLE_1') and hasRole('REQUIRED_ROLE_2'))") | |
public ResponseEntity<BaseResponse> findSomething(...) { | |
... | |
} |