Пример #1
0
        public static void InvokingCreateClassProxyShouldReturnSameType <T>(this CastleProxyGenerator generator)
            where T : class
        {
            //generator.Invoking(x => x.CreateClassProxy<T>())
            //    .Should().BeOfType<T>();
            var instance = generator.CreateClassProxy <T>();

            instance.Should().BeAssignableTo <T>();
        }
Пример #2
0
        public void CreateClassProxy_TargetTypeNullValueGiven_ShouldThrowArgumentNullException()
        {
            var castleProxyGenerator = new CastleProxyGenerator();

            castleProxyGenerator.CreateClassProxy(null);
        }
Пример #3
0
 public void CreateClassProxy_TargetTypeNullValueGiven_ShouldThrowArgumentNullException()
 {
     var castleProxyGenerator = new CastleProxyGenerator();		 
     castleProxyGenerator.CreateClassProxy(null);		 
 }
Пример #4
0
 public static void InvokingCreateClassProxyShouldThrowTypeAccessiblityException <T>(this CastleProxyGenerator generator)
     where T : class
 {
     generator.Invoking(x => x.CreateClassProxy <T>())
     .ShouldThrow <TypeAccessiblityException>();
 }
Пример #5
0
 public void Initialize()
 {
     generator = new CastleProxyGenerator();
 }
 public void Initialize()
 {
     generator = new CastleProxyGenerator();
 }