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>(); }
public void CreateClassProxy_TargetTypeNullValueGiven_ShouldThrowArgumentNullException() { var castleProxyGenerator = new CastleProxyGenerator(); castleProxyGenerator.CreateClassProxy(null); }
public static void InvokingCreateClassProxyShouldThrowTypeAccessiblityException <T>(this CastleProxyGenerator generator) where T : class { generator.Invoking(x => x.CreateClassProxy <T>()) .ShouldThrow <TypeAccessiblityException>(); }
public void Initialize() { generator = new CastleProxyGenerator(); }