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)); }
public void TypeOfTypeAttribute(string name, int index, string expected) { Assert.That(CecilAttributeTest.GetAttributeFromType(name, index).Type.Name, Is.EqualTo(expected)); }
public void Arguments_None(string name, int attributeIndex, int argumentIndex, object expected) { Assert.That(CecilAttributeTest.GetAttributeFromMethod(name, attributeIndex).Arguments, Is.Empty); }
public void Constructor(string name, int index, string expected) { Assert.That(CecilAttributeTest.GetAttributeFromMethod(name, index).Constructor.Name, Is.EqualTo(expected)); }
public void Arguments_List(string name, int attributeIndex, int argumentIndex, object expected) { Assert.That( CecilAttributeTest.GetAttributeFromMethod(name, attributeIndex).Arguments.ToList()[argumentIndex], Is.EqualTo(expected)); }