예제 #1
0
 public void AddBaseLineToQuestionStatementTest()
 {
     FillQuestion_Accessor target = new FillQuestion_Accessor(); // TODO: 初始化為適當值
     int numberOfBaseLine = 5; // TODO: 初始化為適當值
     target.AddBaseLineToQuestionStatement(numberOfBaseLine);
     Assert.AreEqual(" _  _  _  _  _ ", target.QuestionStatement);
 }
예제 #2
0
        public void AddBaseLineToQuestionStatementTest()
        {
            FillQuestion_Accessor target = new FillQuestion_Accessor(); // TODO: 初始化為適當值
            int numberOfBaseLine         = 5;                           // TODO: 初始化為適當值

            target.AddBaseLineToQuestionStatement(numberOfBaseLine);
            Assert.AreEqual(" _  _  _  _  _ ", target.QuestionStatement);
        }
예제 #3
0
        public void InitializeTest()
        {
            FillQuestion_Accessor target = new FillQuestion_Accessor();

            target.Initialize();
            Assert.AreEqual("", target._questionStatement);
            Assert.AreEqual(0, target._isTestedIndex.Count);
        }
예제 #4
0
        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);
        }
예제 #5
0
 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);
 }
예제 #6
0
        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);;
        }
예제 #7
0
        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);
        }
예제 #8
0
 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);
 }
예제 #9
0
        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);
        }
예제 #10
0
 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);
 }
예제 #11
0
 public void InitializeTest()
 {
     FillQuestion_Accessor target = new FillQuestion_Accessor();
     target.Initialize();
     Assert.AreEqual("",target._questionStatement);
     Assert.AreEqual(0, target._isTestedIndex.Count);
 }
예제 #12
0
 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);;
 }