Esempio n. 1
0
        public void ConstraintsOfTypeAttribute(string name, int index, string expected)
        {
            var constraints = string.Join(",",
                                          CecilParameterTest.GetParameterFromType(name, index).Constraints.Select(c => c.Name));

            Assert.That(constraints, Is.EqualTo(expected));
        }
Esempio n. 2
0
        public void Equals(string name1, int index1, string name2, int index2, bool expected)
        {
            var parameter1 = CecilParameterTest.GetParameterFromMethod(name1, index1);
            var parameter2 = CecilParameterTest.GetParameterFromMethod(name2, index2);

            Assert.That(parameter1.Equals(parameter2), Is.EqualTo(expected));
            Assert.That(parameter1 == parameter2, Is.EqualTo(expected));
            Assert.That(parameter1 != parameter2, Is.EqualTo(!expected));
        }
Esempio n. 3
0
 public void Variance(string name, int index, Variance expected)
 {
     Assert.That(CecilParameterTest.GetParameterFromType(name, index).Variance, Is.EqualTo(expected));
 }
Esempio n. 4
0
 public void NameOfTypeAttribute(string name, int index, string expected)
 {
     Assert.That(CecilParameterTest.GetParameterFromType(name, index).Name, Is.EqualTo(expected));
 }
Esempio n. 5
0
 public void HasDefaultConstructorOfTypeAttribute(string name, int index, bool expected)
 {
     Assert.That(CecilParameterTest.GetParameterFromType(name, index).HasDefaultConstructor,
                 Is.EqualTo(expected));
 }