Exemplo n.º 1
0
 public Fixture(ISonicSessionFactoryProvider sessionFactoryProvider
                , ISonicRequestWriter requestWriter
                , string hostname
                , int port
                , string secret
                )
     : base(sessionFactoryProvider, requestWriter, hostname, port, secret)
 {
     //
 }
Exemplo n.º 2
0
        public virtual void Initialize()
        {
            this.Environment = new EnvironmentResponse(1, 20000);
            this.Session     = new Mock <ISonicSession>(MockBehavior.Strict);
            this.Session.Setup(s => s.Dispose());

            this.RequestWriter = new Mock <ISonicRequestWriter>(MockBehavior.Strict);

            this.SessionFactoryProvider = Mock.Of <ISonicSessionFactoryProvider>(ssfp => ssfp.Create(Hostname, Port).Create(this.Environment) == this.Session.Object);
        }
Exemplo n.º 3
0
 public SonicIngestConnection(ISonicSessionFactoryProvider sessionFactoryProvider
                              , ISonicRequestWriter requestWriter
                              , string hostname
                              , int port
                              , string secret
                              )
     : base(sessionFactoryProvider, requestWriter, hostname, port, secret)
 {
     //
 }
Exemplo n.º 4
0
        protected SonicConnection(ISonicSessionFactoryProvider sessionFactoryProvider
                                  , ISonicRequestWriter requestWriter
                                  , string hostname
                                  , int port
                                  , string secret
                                  )
        {
            this.sessionFactoryProvider = sessionFactoryProvider;
            this.RequestWriter          = requestWriter;
            this.hostname = hostname;
            this.port     = port;
            this.secret   = secret;

            // Default environment.
            this.Environment = new EnvironmentResponse(1, 20000);
        }
Exemplo n.º 5
0
 static NSonicFactory()
 {
     SessionFactoryProvider = new SonicSessionFactoryProvider();
 }