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); }
public Factory(Gateway.Settings.IProvider settingsProvider, Response.IParser responseParser) { _settingsProvider = settingsProvider; _responseParser = responseParser; }
public Factory(Gateway.Settings.IProvider settingsProvider, IParser packetParser) { _settingsProvider = settingsProvider; _packetParser = packetParser; }