コード例 #1
0
        private void perfValidateStep(correctResponsesTypeCorrectResponsePerformanceStep step, string name,decimal? min, decimal? max, string msg)
        {
            Assert.AreEqual(name, step.stepName, "step name validation: " + msg);

            Assert.IsAssignableFrom(typeof(correctResponsesTypeCorrectResponsePerformanceStepStepAnswerNumeric), step.stepAnswer.Item,step.stepAnswer.Item.ToString() + " - " + msg);
            correctResponsesTypeCorrectResponsePerformanceStepStepAnswerNumeric numAnswer = (correctResponsesTypeCorrectResponsePerformanceStepStepAnswerNumeric) step.stepAnswer.Item;
            Assert.AreEqual(max != null, numAnswer.maxSpecified, "step max specified valiation: " + msg);
            if (max != null)
            {
                Assert.AreEqual(max.Value, numAnswer.max, "step max value valiation: " + msg);
            }
            Assert.AreEqual(min != null, numAnswer.minSpecified, "step min specified valiation: " + msg);
            if (min != null)
            {
                Assert.AreEqual(min.Value, numAnswer.min, "step min value valiation: " + msg);
            }
        }
コード例 #2
0
        private void perfValidateStep(correctResponsesTypeCorrectResponsePerformanceStep step, string name , string answer, string msg)
        {
            Assert.AreEqual(name, step.stepName, "step name validation: " + msg);

            Assert.AreEqual(answer, step.stepAnswer.Item, "step answer validation: " + msg);
        }