示例#1
0
        public void ParseQuest_GivenDBDataQuest_CompareStepData()
        {
            var dataQuest = new DataQuestSpy(dbDataQuest);

            FakeServer.Load();

            var stepCount = 5;

            for (int i = 1; i <= stepCount; i++)
            {
                dataQuest.Step = i;
                int index = i - 1;
                Assert.AreEqual(new List <byte>()
                {
                    0, 4, 6, 6, 5
                }[index], (byte)dataQuest.StepType, "Failed at Step " + dataQuest.Step);
                Assert.AreEqual(new List <long>()
                {
                    1, 2, 3, 4, 5
                }[index], dataQuest.SpyRewardMoney);
                Assert.AreEqual(new long[] { 6, 7, 8, 9, 10 }[index], dataQuest.SpyRewardXP);
                Assert.AreEqual(0, dataQuest.SpyRewardBP);
                Assert.AreEqual(new string[] { "tic", "trick", "truck", "track", "trock" }[index], dataQuest.TargetName);
                Assert.AreEqual(new long[] { 10, 9, 8, 7, 6 }[index], dataQuest.TargetRegion);
                Assert.AreEqual(new string[] { "foo", "bar", "baz", "bork", "fuu" }[index], dataQuest.SpyTargetText);
                Assert.AreEqual("storyA", dataQuest.Story);
                Assert.AreEqual(new string[] { "storyA", "", "storyC", "storyD", "storyEnd" }[index], dataQuest.SpySourceText);
                Assert.AreEqual(new string[] { "step1", "step2", "step3", "step4", "step5" }[index], dataQuest.StepTexts[index]);
                Assert.AreEqual(new string[] { "item1", "item2", "item3", "item4", "item5" }[index], dataQuest.SpyStepItemTemplate);
            }
        }