Skip to content

Commit

Permalink
[ci] formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hazendaz committed Dec 28, 2024
1 parent 8d0ad84 commit 5abb46b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/test/java/org/apache/ibatis/type/TypeAliasRegistryTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2022 the original author or authors.
* Copyright 2009-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,17 +80,16 @@ void shouldFetchCharType() {
void shouldNotBeAbleToRegisterAliasWithEmptyString() {
TypeAliasRegistry typeAliasRegistry = new TypeAliasRegistry();

assertThatThrownBy(() -> typeAliasRegistry.registerAlias("foo", ""))
.isInstanceOf(TypeException.class)
.hasMessageContaining("Error registering type alias foo for");
assertThatThrownBy(() -> typeAliasRegistry.registerAlias("foo", "")).isInstanceOf(TypeException.class)
.hasMessageContaining("Error registering type alias foo for");
}

@Test
void shouldNotBeAbleToResolveNotExistsAlias() {
TypeAliasRegistry typeAliasRegistry = new TypeAliasRegistry();

assertThatThrownBy(() -> typeAliasRegistry.resolveAlias("abc"))
.isInstanceOf(TypeException.class)
.hasMessageContaining("Could not resolve type alias 'abc'. Cause: java.lang.ClassNotFoundException: Cannot find class: abc");
assertThatThrownBy(() -> typeAliasRegistry.resolveAlias("abc")).isInstanceOf(TypeException.class)
.hasMessageContaining(
"Could not resolve type alias 'abc'. Cause: java.lang.ClassNotFoundException: Cannot find class: abc");
}
}

0 comments on commit 5abb46b

Please sign in to comment.