public void ArgumentOutOfRangeExceptionTest() { GXJsonClient cl = new GXJsonClient("http://localhost:6786/"); GXEchoRequest expected = new GXEchoRequest(); expected.Id = -1; GXEchoResponse actual = cl.Put(expected); }
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); }
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); }
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); }
void Download(object sender, GXAsyncWork work, object[] parameters) { //TODO: GXDeviceProfile dp = parameters[0] as GXDeviceProfile; GXJsonClient parser = new GXJsonClient(Arguments.DownloadServer, Arguments.UserName, Arguments.Password); GXDownloadRequest req = new GXDownloadRequest(dp); GXDownloadResponse res = parser.Post(req); }