Ejemplo n.º 1
0
        public void ReturnsItselfAmongOtherEventFields()
        {
            Data.EventData   data  = GetEventField("class Test { event System.Action e1, e2; }");
            Data.EventData[] other = data.GetUnderlayingEvents().ToArray();

            Assert.True(other.Length == 2 && other.Any(d => d == data) && other.Any(d => d.Name == "e2"));
        }
Ejemplo n.º 2
0
        public void ReturnsSelf_When_HasNoOtherEventFieldsOnDeclaration()
        {
            Data.EventData   data  = GetEventField("class Test { event System.Action e; }");
            Data.EventData[] other = data.GetUnderlayingEvents().ToArray();

            Assert.True(other.Length == 1 && data == other[0]);
        }
Ejemplo n.º 3
0
        public void ReturnsEmpty_When_IsNotEventField()
        {
            Data.EventData   data  = GetEventProperty("class Test { event System.Action e { add { } remove { } }");
            Data.EventData[] other = data.GetUnderlayingEvents().ToArray();

            Assert.Empty(other);
        }