-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from Sakana152/master
PR
- Loading branch information
Showing
3 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
44 changes: 44 additions & 0 deletions
44
src/test/java/ReFreSH/JMobileSuit/LangResourceBundleTest.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package ReFreSH.JMobileSuit; | ||
|
||
import org.junit.Before; | ||
import org.junit.Test; | ||
import static org.junit.Assert.*; | ||
|
||
public class LangResourceBundleTest { | ||
|
||
private LangResourceBundle langResourceBundle; | ||
|
||
@Before | ||
public void setUp() { | ||
// 初始化 LangResourceBundle 实例 | ||
langResourceBundle = new LangResourceBundle(); | ||
} | ||
|
||
@Test | ||
public void testStringsAreLoaded() { | ||
// 验证每个字符串属性是否不为 null | ||
assertNotNull(langResourceBundle.Bic); | ||
assertNotNull(langResourceBundle.BicExp1); | ||
assertNotNull(langResourceBundle.BicExp2); | ||
assertNotNull(langResourceBundle.Done); | ||
assertNotNull(langResourceBundle.Error); | ||
assertNotNull(langResourceBundle.InvalidCommand); | ||
assertNotNull(langResourceBundle.MemberNotFound); | ||
assertNotNull(langResourceBundle.Members); | ||
assertNotNull(langResourceBundle.ObjectNotFound); | ||
assertNotNull(langResourceBundle.Unknown); | ||
assertNotNull(langResourceBundle.ViewBic); | ||
assertNotNull(langResourceBundle.WorkInstance); | ||
assertNotNull(langResourceBundle.ReturnValue); | ||
assertNotNull(langResourceBundle.Default); | ||
assertNotNull(langResourceBundle.AllOK); | ||
assertNotNull(langResourceBundle.ApplicationException); | ||
} | ||
|
||
// 可以添加更多的测试方法来验证特定的字符串值 | ||
// 例如: | ||
@Test | ||
public void testSpecificStringValue() { | ||
assertEquals("就绪.", langResourceBundle.Done); | ||
} | ||
} |