Logo
Explore Help
Sign In
gaspersic/java-design-patterns
1
0
Fork 0
You've already forked java-design-patterns
Code Issues Pull Requests Projects Releases Wiki Activity
Files
e29a18860a06aa812e5091a346eea27bef5b5259
java-design-patterns/lockable-object/src/test/java/com/iluwatar/lockableobject/ExceptionsTest.java

22 lines
382 B
Java
Raw Normal View History

feature: resolve #1282 for Lockable Object pattern. (#1702) * Added Lockable-Object pattern. Closes #1282. * Refactor method name. * Refactor sonar lint bugs. * Added tests and enum Constants. * Increase coverage. * Changed @Data to Getters and Setters. * Iluwatar's comment on pull request #1702. * Fixed codes mells. * Incremented wait time to 3 seconds. * Reduced wait time to 2 seconds. * Cleaned Code Smells. * Incremented wait time, removed cool down. * Refactored README.md file. Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-05-14 18:56:41 +03:00
package com.iluwatar.lockableobject;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
class ExceptionsTest {
private String msg = "test";
@Test
void testException(){
Exception e;
try{
throw new LockingException(msg);
}
catch(LockingException ex){
e = ex;
}
Assertions.assertEquals(msg, e.getMessage());
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.1 Page: 52ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API