コード例 #1
0
            public void SetUp()
            {
                var settings = new AcceptanceTestSettings();
                var client   = new RestClient(settings.BaseUrl);
                var request  = new RestRequest("register");

                response = client.Execute <ApiResponse>(request);
            }
コード例 #2
0
            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));
            }
コード例 #3
0
ファイル: MapTests.cs プロジェクト: theparticleman/XorTagCore
            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);
            }
コード例 #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"));
        }
コード例 #5
0
            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));
            }
コード例 #6
0
            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"));
            }