public void SetUp()
            {
                var settings = new AcceptanceTestSettings();
                var client   = new RestClient(settings.BaseUrl);
                var request  = new RestRequest("register");

                response = client.Execute <ApiResponse>(request);
            }
            public void It_should_result_in_404()
            {
                var settings = new AcceptanceTestSettings();
                var client   = new RestClient(settings.BaseUrl);

                var moveReponse = client.Execute <ApiResponse>(new RestRequest("/moveup/" + 9999));

                Assert.That(moveReponse.StatusCode, Is.EqualTo(HttpStatusCode.NotFound));
            }
Exemplo n.º 3
0
            public void SetUp()
            {
                var settings = new AcceptanceTestSettings();
                var client   = new RestClient(settings.BaseUrl);

                mapResponse = client.Execute(new RestRequest("map"));
                var data = client.DownloadData(new RestRequest("map"));

                parsedImage = new MagickImage(data);
            }
Exemplo n.º 4
0
        public void SetUp()
        {
            var settings = new AcceptanceTestSettings();
            var client   = new RestClient(settings.BaseUrl);

            client.Execute(new RestRequest("admin/clearall"));
            registerResponse = client.Execute <ApiResponse>(new RestRequest("register"));

            statsResponse = client.Execute <StatsResponse>(new RestRequest("stats"));
        }
            public void SetUp()
            {
                var settings = new AcceptanceTestSettings();
                var client   = new RestClient(settings.BaseUrl);

                do //make sure that the player we've registered isn't at the top of the map
                {
                    registerResponse = client.Execute <ApiResponse>(new RestRequest("register"));
                } while (registerResponse.Data.Y <= 0);
                moveReponse = client.Execute <ApiResponse>(new RestRequest("/moveup/" + registerResponse.Data.Id));
            }
            public void SetUp()
            {
                var settings = new AcceptanceTestSettings();
                var client   = new RestClient(settings.BaseUrl);

                var clearResponse = client.Execute(new RestRequest("admin/clearall"));

                Assert.That(clearResponse.StatusCode, Is.EqualTo(HttpStatusCode.OK));

                firstRegistrationResponse  = client.Execute <ApiResponse>(new RestRequest("register"));
                secondRegistrationResponse = client.Execute <ApiResponse>(new RestRequest("register"));
            }