コード例 #1
0
        public GXEchoResponse Delete(GXEchoRequest request)
        {
            GXEchoResponse res = new GXEchoResponse();

            res.Id = request.Id;
            return(res);
        }
コード例 #2
0
        public void ArgumentOutOfRangeExceptionTest()
        {
            GXJsonClient  cl       = new GXJsonClient("http://localhost:6786/");
            GXEchoRequest expected = new GXEchoRequest();

            expected.Id = -1;
            GXEchoResponse actual = cl.Put(expected);
        }
コード例 #3
0
        public void AuthenticationFailureTest()
        {
            GXJsonClient  cl       = new GXJsonClient("http://localhost:6786/");
            GXEchoRequest expected = new GXEchoRequest();

            expected.Id = new Random().Next();
            GXEchoResponse actual = cl.Delete(expected);

            Assert.AreEqual(expected.Id, actual.Id);
        }
コード例 #4
0
        public void PutTest()
        {
            GXJsonClient  cl       = new GXJsonClient("http://localhost:6786/");
            GXEchoRequest expected = new GXEchoRequest();

            expected.Id = new Random().Next();
            GXEchoResponse actual = cl.Put(expected);

            Assert.AreEqual(expected.Id, actual.Id);
        }
コード例 #5
0
        public GXEchoResponse Put(GXEchoRequest request)
        {
            GXEchoResponse res = new GXEchoResponse();

            if (request.Id == -1)
            {
                throw new ArgumentOutOfRangeException("Put");
            }
            res.Id = request.Id;
            return(res);
        }
コード例 #6
0
        public void DeleteTest()
        {
            Server.Close();
            Server = new GXAuthenticationServer("http://localhost:6786/");
            GXJsonClient  cl       = new GXJsonClient("http://localhost:6786/", "Gurux", "Gurux");
            GXEchoRequest expected = new GXEchoRequest();

            expected.Id = new Random().Next();
            GXEchoResponse actual = cl.Delete(expected);

            Assert.AreEqual(expected.Id, actual.Id);
        }