public void BeginTest()
 {
     repo                = new MockRepository();
     channelFactory      = repo.StrictMock <ICanCreateChannels <IService> >();
     communicationObject = repo.StrictMultiMock <ICommunicationObject>(typeof(IService));
     manager             = new SingleActionChannelManager <IService>(channelFactory);
 }
 public void BeginTest()
 {
     repo = new MockRepository();
     channelFactory = repo.StrictMock<ICanCreateChannels<IService>>();
     communicationObject = repo.StrictMultiMock<ICommunicationObject>(typeof(IService));
     manager = new SingleActionChannelManager<IService>(channelFactory);
 }
 public void BeginTest()
 {
     repo = new MockRepository();
     channelCreator = repo.StrictMock<ICanCreateChannels<IService>>();
     poolFactory = repo.StrictMock<IPoolFactory>();
     pool = repo.StrictMock<IObjectPool>();
     Expect.Call(poolFactory.CreatePool(null)).IgnoreArguments().Return(pool);
     LastCall.IgnoreArguments();
 }
 public void BeginTest()
 {
     repo           = new MockRepository();
     channelCreator = repo.StrictMock <ICanCreateChannels <IService> >();
     poolFactory    = repo.StrictMock <IPoolFactory>();
     pool           = repo.StrictMock <IObjectPool>();
     Expect.Call(poolFactory.CreatePool(null)).IgnoreArguments().Return(pool);
     LastCall.IgnoreArguments();
 }
Example #5
0
 /// <summary>
 /// Constructs a channelpoolmanager.
 /// </summary>
 /// <param name="factory">The channel factory to use.</param>
 public ChannelPoolManager(ICanCreateChannels <TChannel> factory, IPoolFactory poolFactory)
     : base(factory)
 {
     Pool = CreatePool(poolFactory);
 }
Example #6
0
 /// <summary>
 /// Constructor which takes a channelfactory which can be used by this instance.
 /// </summary>
 /// <param name="factory"></param>
 public SingleActionChannelManager(ICanCreateChannels <TChannel> factory)
     : base(factory)
 {
 }
Example #7
0
 /// <summary>
 /// Constructor taking a channelfactory.
 /// </summary>
 /// <param name="factory">The channelfactory to use in this instance.</param>
 public ChannelManagerBase(ICanCreateChannels <TChannel> factory)
 {
     ChannelCreater = factory;
 }