public void SplitLineTest() { Dictionary_Accessor target = new Dictionary_Accessor(); // TODO: 初始化為適當值 string line = " 基本20 Happy Ribbat [名詞]快樂兔 1024"; // TODO: 初始化為適當值 string[] expected = { "Happy Ribbat", "[名詞]快樂兔" }; // TODO: 初始化為適當值 string[] actual; actual = target.SplitLine(line); Assert.AreEqual(expected[0], actual[0]); Assert.AreEqual(expected[1], actual[1]); }
public void IgnoreSpectiveWordsTest() { Dictionary_Accessor target = new Dictionary_Accessor(); // TODO: 初始化為適當值 bool actual; actual = target.IgnoreSpectiveWords(" "); Assert.AreEqual(true, actual); actual = target.IgnoreSpectiveWords(" 基本1000"); Assert.AreEqual(true, actual); actual = target.IgnoreSpectiveWords(" 基本2000"); Assert.AreEqual(true, actual); actual = target.IgnoreSpectiveWords("5"); Assert.AreEqual(true, actual); actual = target.IgnoreSpectiveWords("What"); Assert.AreEqual(false, actual); }
public void SplitLineTest() { Dictionary_Accessor target = new Dictionary_Accessor(); // TODO: 初始化為適當值 string line = " 基本20 Happy Ribbat [名詞]快樂兔 1024"; // TODO: 初始化為適當值 string[] expected = {"Happy Ribbat","[名詞]快樂兔"}; // TODO: 初始化為適當值 string[] actual; actual = target.SplitLine(line); Assert.AreEqual(expected[0], actual[0]); Assert.AreEqual(expected[1], actual[1]); }