コード例 #1
0
        public void CheckMember_InvalidFragmentUsage()
        {
            var sampleMethod = GetSampleMethod ("InvalidFragmentUsage");

              var rule = new MultipleFragmentUsageRule();
              var result = rule.Check (sampleMethod);
              Assert.That (TestHelper.ContainsProblemID (c_InjectionCopRuleId, result), Is.True);
        }
コード例 #2
0
        public void CheckMember_ValidFragmentUsage()
        {
            var sampleMethod = GetSampleMethod ("ValidFragmentUsage");

              var rule = new MultipleFragmentUsageRule();
              var result = rule.Check (sampleMethod);
              Assert.That (result, Is.Empty);
        }
コード例 #3
0
        public void CheckMember_FormatsMessage()
        {
            var sampleMethod = GetSampleMethod ("InvalidFragmentUsage");

              var rule = new MultipleFragmentUsageRule();
              var result = rule.Check (sampleMethod);
              Assert.That (result[0].Resolution.ToString(), Is.EqualTo("Parameter 'parameter' has multiple fragment types assigned."));
        }