Exemplo n.º 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));
        }
Exemplo n.º 2
0
 public void TypeOfTypeAttribute(string name, int index, string expected)
 {
     Assert.That(CecilAttributeTest.GetAttributeFromType(name, index).Type.Name, Is.EqualTo(expected));
 }
Exemplo n.º 3
0
 public void Arguments_None(string name, int attributeIndex, int argumentIndex, object expected)
 {
     Assert.That(CecilAttributeTest.GetAttributeFromMethod(name, attributeIndex).Arguments, Is.Empty);
 }
Exemplo n.º 4
0
 public void Constructor(string name, int index, string expected)
 {
     Assert.That(CecilAttributeTest.GetAttributeFromMethod(name, index).Constructor.Name, Is.EqualTo(expected));
 }
Exemplo n.º 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));
 }