예제 #1
0
        public Test_WebService(ComposedFixture fixture)
        {
            TestHelper.ResetDocker(this.GetType());

            this.composedFixture = fixture;

            composedFixture.Start(
                () =>
            {
                composedFixture.AddFixture("nats", new NatsFixture(),
                                           natsFixture =>
                {
                    natsFixture.StartAsComposed();
                });

                composedFixture.AddServiceFixture("web-0", new NeonServiceFixture <WebService>(), () => CreateService("web-0"));
                composedFixture.AddServiceFixture("web-1", new NeonServiceFixture <WebService>(), () => CreateService("web-1"));
            });

            this.natsFixture = (NatsFixture)composedFixture["nats"];
            this.web0        = (NeonServiceFixture <WebService>)composedFixture["web-0"];
            this.web1        = (NeonServiceFixture <WebService>)composedFixture["web-1"];

            connection       = CreateConnection(web0.Service.ServiceMap["web-0"].Endpoints.Default.Uri + "echo", HttpTransportType.WebSockets, userName: "******");
            secondConnection = CreateConnection(web1.Service.ServiceMap["web-1"].Endpoints.Default.Uri + "echo", HttpTransportType.WebSockets, userName: "******");
            thirdConnection  = CreateConnection(web1.Service.ServiceMap["web-0"].Endpoints.Default.Uri + "echo", HttpTransportType.WebSockets, userName: "******");
            fourthConnection = CreateConnection(web1.Service.ServiceMap["web-1"].Endpoints.Default.Uri + "echo", HttpTransportType.WebSockets, userName: "******");
        }
예제 #2
0
        public Test_ServiceMap(ComposedFixture fixture)
        {
            this.composedFixture = fixture;
            this.serviceMap      = CreateServiceMap();

            composedFixture.Start(
                () =>
            {
                composedFixture.AddServiceFixture <WebService>("web-service", new NeonServiceFixture <WebService>(), () => CreateWebService());
                composedFixture.AddServiceFixture <RelayService>("relay-service", new NeonServiceFixture <RelayService>(), () => CreateRelayService());
            });

            this.webServiceFixture   = (NeonServiceFixture <WebService>)composedFixture["web-service"];
            this.relayServiceFixture = (NeonServiceFixture <RelayService>)composedFixture["relay-service"];

            Assert.True(webServiceFixture.IsRunning);
            Assert.True(relayServiceFixture.IsRunning);
        }
예제 #3
0
        public Test_QueueService(ComposedFixture fixture)
        {
            TestHelper.ResetDocker(this.GetType());

            this.composedFixture = fixture;

            composedFixture.Start(
                () =>
            {
                composedFixture.AddFixture("nats", new NatsFixture(),
                                           natsFixture =>
                {
                    natsFixture.StartAsComposed();
                });

                composedFixture.AddServiceFixture("queue-service", new NeonServiceFixture <QueueService>(), () => CreateQueueService());
            });

            this.natsFixture         = (NatsFixture)composedFixture["nats"];
            this.queueServiceFixture = (NeonServiceFixture <QueueService>)composedFixture["queue-service"];
        }
예제 #4
0
        public Test_WebService(NeonServiceFixture <WebService> fixture)
        {
            fixture.Start(() => CreateService());

            this.fixture = fixture;
        }
예제 #5
0
        public Test_ComplexService(NeonServiceFixture <ComplexService> fixture)
        {
            fixture.Start(() => CreateService());

            this.fixture = fixture;
        }