Exemple #1
0
        public void StartAndStopApi_IsSutRunningShouldReturnFalse()
        {
            EmbeddedEvoMasterController evoMasterController = new EmbeddedEvoMasterController();

            evoMasterController.StartSut();

            evoMasterController.StopSut();

            Assert.False(evoMasterController.IsSutRunning());
        }
Exemple #2
0
        public async Task CallApiWhenStopped_Fail()
        {
            EmbeddedEvoMasterController evoMasterController = new EmbeddedEvoMasterController();

            var baseUrl = evoMasterController.StartSut();

            evoMasterController.StopSut();

            await Assert.ThrowsAsync <HttpRequestException>(async() => await Client.GetAsync($"{baseUrl}/helloworld"));
        }
Exemple #3
0
        public async Task StartApi_RetrunExpectedStatusCode(string uri, int expectedStatusCode)
        {
            EmbeddedEvoMasterController evoMasterController = new EmbeddedEvoMasterController();

            var baseUrl = evoMasterController.StartSut();

            var response = await Client.GetAsync($"{baseUrl}/{uri}");

            evoMasterController.StopSut();

            Assert.Equal(expectedStatusCode, (int)response.StatusCode);
        }
Exemple #4
0
        public static void Main(string[] args)
        {
            var embeddedEvoMasterController = new EmbeddedEvoMasterController();

            if (args.Length > 0)
            {
                var controllerPort = Int32.Parse(args[0]);
                embeddedEvoMasterController.SetControllerPort(controllerPort);
            }

            var instrumentedSutStarter = new InstrumentedSutStarter(embeddedEvoMasterController);

            System.Console.WriteLine("Driver is starting...\n");

            instrumentedSutStarter.Start();
        }