예제 #1
0
        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));
        }
예제 #2
0
 public void Visibility(string name, Visibility expected)
 {
     Assert.That(CecilFieldTest.GetField(name).Visibility, Is.EqualTo(expected));
 }
예제 #3
0
 public void Type(string name, string expected)
 {
     Assert.That(CecilFieldTest.GetField(name).Type.Name, Is.EqualTo(expected));
 }
예제 #4
0
 public void Parent(string name, string expected)
 {
     Assert.That(CecilFieldTest.GetField(name).Parent.Name, Is.EqualTo(expected));
 }
예제 #5
0
 public void Name(string name)
 {
     Assert.That(CecilFieldTest.GetField(name).Name, Is.EqualTo(name));
 }
예제 #6
0
 public void Binding(string name, Binding expected)
 {
     Assert.That(CecilFieldTest.GetField(name).Binding, Is.EqualTo(expected));
 }
예제 #7
0
        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));
        }