Exemplo n.º 1
0
 public void CreateTypedDelegateShouldReifyDelegate()
 {
     Func<string, bool> expected = Fact1;
     var target = new WeakDelegate<Func<string, bool>>( expected );
     var actual = target.CreateTypedDelegate();
     Assert.Equal( expected, actual );
 }
Exemplo n.º 2
0
        public void CreateDelegateShouldReifyStrongDelegate()
        {
            Func<string, bool> expected = Fact1;
            var target = new WeakDelegate( expected );
            var actual = target.CreateDelegate();

            Assert.NotNull( actual );
            Assert.IsAssignableFrom<Func<string, bool>>( actual );
        }