public void ShouldBeAbleToCreateADeviceContext()
        {
            With.Messaging.Client.IEndpoint clientEndpoint = A.Fake <With.Messaging.Client.IEndpoint>();
            IClock clock = A.Fake <IClock>();

            StandardKernel kernel = new StandardKernel();

            kernel.Bind <IClock>().ToConstant(clock).InSingletonScope();

            Factory factory = new Factory(kernel);

            Gateway.Settings.IProvider settingsProvider = A.Fake <Gateway.Settings.IProvider>();

            IContext context = factory.CreateDeviceInContext(settingsProvider, clientEndpoint);

            Assert.IsNotNull(context);
            Assert.IsNotNull(context.Kernel);
            Assert.IsNotNull(context.Instance);

            Assert.AreEqual(settingsProvider, context.SettingsProvider);
        }
Exemple #2
0
 public Factory(Gateway.Settings.IProvider settingsProvider, Response.IParser responseParser)
 {
     _settingsProvider = settingsProvider;
     _responseParser   = responseParser;
 }
Exemple #3
0
 public Factory(Gateway.Settings.IProvider settingsProvider, IParser packetParser)
 {
     _settingsProvider = settingsProvider;
     _packetParser     = packetParser;
 }
Exemple #4
0
 public Factory(Gateway.Settings.IProvider settingsProvider, Response.IParser responseParser)
 {
     _settingsProvider = settingsProvider;
     _responseParser = responseParser;
 }
Exemple #5
0
 public Factory(Gateway.Settings.IProvider settingsProvider, IParser packetParser)
 {
     _settingsProvider = settingsProvider;
     _packetParser = packetParser;
 }