Beispiel #1
0
        public void Equals(string name1, int index1, string name2, int index2, bool expected)
        {
            var attribute1 = CecilAttributeTest.GetAttributeFromMethod(name1, index1);
            var attribute2 = CecilAttributeTest.GetAttributeFromMethod(name2, index2);

            Assert.That(attribute1.Equals(attribute2), Is.EqualTo(expected));
            Assert.That(attribute1 == attribute2, Is.EqualTo(expected));
            Assert.That(attribute1 != attribute2, Is.EqualTo(!expected));
        }
Beispiel #2
0
 public void TypeOfTypeAttribute(string name, int index, string expected)
 {
     Assert.That(CecilAttributeTest.GetAttributeFromType(name, index).Type.Name, Is.EqualTo(expected));
 }
Beispiel #3
0
 public void Arguments_None(string name, int attributeIndex, int argumentIndex, object expected)
 {
     Assert.That(CecilAttributeTest.GetAttributeFromMethod(name, attributeIndex).Arguments, Is.Empty);
 }
Beispiel #4
0
 public void Constructor(string name, int index, string expected)
 {
     Assert.That(CecilAttributeTest.GetAttributeFromMethod(name, index).Constructor.Name, Is.EqualTo(expected));
 }
Beispiel #5
0
 public void Arguments_List(string name, int attributeIndex, int argumentIndex, object expected)
 {
     Assert.That(
         CecilAttributeTest.GetAttributeFromMethod(name, attributeIndex).Arguments.ToList()[argumentIndex],
         Is.EqualTo(expected));
 }