public void AddBaseLineToQuestionStatementTest() { FillQuestion_Accessor target = new FillQuestion_Accessor(); // TODO: 初始化為適當值 int numberOfBaseLine = 5; // TODO: 初始化為適當值 target.AddBaseLineToQuestionStatement(numberOfBaseLine); Assert.AreEqual(" _ _ _ _ _ ", target.QuestionStatement); }
public void InitializeTest() { FillQuestion_Accessor target = new FillQuestion_Accessor(); target.Initialize(); Assert.AreEqual("", target._questionStatement); Assert.AreEqual(0, target._isTestedIndex.Count); }
public void GetAnswerTest() { FillQuestion_Accessor target = new FillQuestion_Accessor(); // TODO: 初始化為適當值 Assert.AreEqual(string.Empty, target.Answer); target._testedVocabulary = new Word("Balance", "平衡"); string expected = "Balance"; // TODO: 初始化為適當值 string actual; actual = target.Answer; Assert.AreEqual(expected, actual); }
public void CreateNewQuestionTest() { Dictionary dictionary = new Dictionary(); FillQuestion_Accessor target = new FillQuestion_Accessor(dictionary); // TODO: 初始化為適當值 dictionary.LoadWords("dictionary2000.txt"); target.CreateNewQuestion(); string first = target.QuestionStatement; target.CreateNewQuestion(); string second = target.QuestionStatement; Assert.AreNotEqual(first, second); Assert.AreEqual(2, target._isTestedIndex.Count); }
public void GetQuestionStatementTest() { FillQuestion_Accessor target = new FillQuestion_Accessor(); // TODO: 初始化為適當值 target._testedVocabulary = new Word("Balance", "平衡"); string expected = "平衡 B _ _ a _ _ _ (7)"; // TODO: 初始化為適當值 string actual; target._questionStatement = target._testedVocabulary.Chinese + " "; target.AddEnglishTipToQuetionStatement(3); actual = target.QuestionStatement; Assert.AreEqual(expected, actual);; }
public void AddEnglishTipToQuetionStatementTest() { FillQuestion_Accessor target = new FillQuestion_Accessor(); // TODO: 初始化為適當值 int tipIndex = 3; // TODO: 初始化為適當值 target._testedVocabulary = new Word("Test", "測試"); target.AddEnglishTipToQuetionStatement(tipIndex); Assert.AreEqual("T _ _ t(4)", target._questionStatement); target.Initialize(); target._testedVocabulary = new Word("a", "一個"); target.AddEnglishTipToQuetionStatement(2); Assert.AreEqual(" _ (1)", target._questionStatement); target.Initialize(); target._testedVocabulary = new Word("AM", "上午"); target.AddEnglishTipToQuetionStatement(1); Assert.AreEqual("A _ (2)", target._questionStatement); }
public void GetAnswerTest() { FillQuestion_Accessor target = new FillQuestion_Accessor(); // TODO: 初始化為適當值 Assert.AreEqual(string.Empty, target.Answer); target._testedVocabulary = new Word("Balance", "平衡"); string expected ="Balance"; // TODO: 初始化為適當值 string actual; actual = target.Answer; Assert.AreEqual(expected, actual); }
public void InitializeTest() { FillQuestion_Accessor target = new FillQuestion_Accessor(); target.Initialize(); Assert.AreEqual("",target._questionStatement); Assert.AreEqual(0, target._isTestedIndex.Count); }