public void Equals(string name1, string name2, bool expected) { var field1 = CecilFieldTest.GetField(name1); var field2 = CecilFieldTest.GetField(name2); Assert.That(field1.Equals(field2), Is.EqualTo(expected)); Assert.That(field1 == field2, Is.EqualTo(expected)); Assert.That(field1 != field2, Is.EqualTo(!expected)); }
public void Visibility(string name, Visibility expected) { Assert.That(CecilFieldTest.GetField(name).Visibility, Is.EqualTo(expected)); }
public void Type(string name, string expected) { Assert.That(CecilFieldTest.GetField(name).Type.Name, Is.EqualTo(expected)); }
public void Parent(string name, string expected) { Assert.That(CecilFieldTest.GetField(name).Parent.Name, Is.EqualTo(expected)); }
public void Name(string name) { Assert.That(CecilFieldTest.GetField(name).Name, Is.EqualTo(name)); }
public void Binding(string name, Binding expected) { Assert.That(CecilFieldTest.GetField(name).Binding, Is.EqualTo(expected)); }
public void Attributes(string name, string expected) { var attributes = string.Join(",", CecilFieldTest.GetField(name).Attributes.Select(a => a.Type.Name)); Assert.That(attributes, Is.EqualTo(expected)); }