コード例 #1
0
        public void ToDictionaryTest()
        {
            var result = new TokenReplayResult
            {
                FailedCasesTransitionNotEnabled = new List<Case> { new Case(), new Case() },
                FailedCasesTransitionNotFound = new List<Case> { new Case() },
                NumberOfCases = 5,
                SuccessfulReplays = 2
            };

            var dict = (Dictionary<string, string>)result.ToDictionary();
            Assert.AreEqual("2", dict["Successful Replays"]);
            Assert.AreEqual("40%", dict["Success Rate"]);
            Assert.AreEqual("2", dict["Transitions not enabled"]);
            Assert.AreEqual("1", dict["Transitions not found"]);
        }