mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-07-01 21:07:25 +00:00
[Add][Update] CacheStore-API 添加新的测试, 并完善其他测试;
[Add] GetCacheStoreExceptionTest 添加针对 GetCacheStoreExceptionTest 的测试项; [Update] HashSingleCacheStoreTest 完善单元测试项;
This commit is contained in:
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2021 LamGC
|
||||
*
|
||||
* ContentGrabbingJi is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* ContentGrabbingJi is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.lamgc.cgj.bot.cache.exception;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class GetCacheStoreExceptionTest {
|
||||
|
||||
@Test
|
||||
public void messageCheck() {
|
||||
final String message = "uncaught exception";
|
||||
Assert.assertEquals(message, new GetCacheStoreException(message).getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void causeCheck() {
|
||||
final String message = "uncaught exception";
|
||||
final Throwable cause = new IllegalStateException();
|
||||
|
||||
Assert.assertEquals(cause, new GetCacheStoreException(message, cause).getCause());
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user