List of usage examples for org.springframework.http MediaType APPLICATION_JSON_UTF8_VALUE
String APPLICATION_JSON_UTF8_VALUE
To view the source code for org.springframework.http MediaType APPLICATION_JSON_UTF8_VALUE.
Click Source Link
From source file:com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.java
@Test public void pulseUpdateForMemberDiskThroughput() throws Exception { this.mockMvc//from w w w. ja v a2 s . co m .perform(post("/pulseUpdate") .param("pulseData", "{\"MemberDiskThroughput\":{\"memberName\":\"" + MEMBER_NAME + "\"}}") .principal(principal) .accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))) .andExpect(status().isOk()) .andExpect(jsonPath("$.MemberDiskThroughput.throughputWritesTrend").isEmpty()) .andExpect(jsonPath("$.MemberDiskThroughput.throughputReadsTrend").isEmpty()) .andExpect(jsonPath("$.MemberDiskThroughput.throughputWrites").value(0D)) .andExpect(jsonPath("$.MemberDiskThroughput.throughputReads").value(0D)); }
From source file:com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.java
@Test public void pulseUpdateForMemberGatewayHub() throws Exception { this.mockMvc/*from ww w. j av a 2 s. c o m*/ .perform(post("/pulseUpdate") .param("pulseData", "{\"MemberGatewayHub\":{\"memberName\":\"" + MEMBER_NAME + "\"}}") .principal(principal) .accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))) .andExpect(status().isOk()).andExpect(jsonPath("$.MemberGatewayHub.isGatewayReceiver").value(false)) .andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].batchTimeInterval").value(0)) .andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].batchConflationEnabled").value(false)) .andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].queueSize").value(0)) .andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].senderType").value(false)) .andExpect( jsonPath("$.MemberGatewayHub.asyncEventQueues[0].asyncEventListener").value(AEQ_LISTENER)) .andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].batchSize").value(0)) .andExpect(jsonPath("$.MemberGatewayHub.asyncEventQueues[0].primary").value(false)) .andExpect(jsonPath("$.MemberGatewayHub.isGatewaySender").value(false)) .andExpect(jsonPath("$.MemberGatewayHub.regionsInvolved").isEmpty()) .andExpect(jsonPath("$.MemberGatewayHub.gatewaySenders").isEmpty()); }
From source file:com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.java
@Test public void pulseUpdateForMemberGCPauses() throws Exception { this.mockMvc.perform(post("/pulseUpdate") .param("pulseData", "{\"MemberGCPauses\":{\"memberName\":\"" + MEMBER_NAME + "\"}}") .principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))) .andExpect(status().isOk()).andExpect(jsonPath("$.MemberGCPauses.gcPausesCount").value(0)) .andExpect(jsonPath("$.MemberGCPauses.gcPausesTrend").isEmpty()); }
From source file:com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.java
@Test public void pulseUpdateForMemberHeapUsage() throws Exception { this.mockMvc.perform(post("/pulseUpdate") .param("pulseData", "{\"MemberHeapUsage\":{\"memberName\":\"" + MEMBER_NAME + "\"}}") .principal(principal).accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))) .andExpect(status().isOk()).andExpect(jsonPath("$.MemberHeapUsage.heapUsageTrend").isEmpty()) .andExpect(jsonPath("$.MemberHeapUsage.currentHeapUsage").value(0)); }
From source file:com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.java
@Test public void pulseUpdateForMemberKeyStatistics() throws Exception { this.mockMvc/* www . j a v a2 s . c om*/ .perform(post("/pulseUpdate") .param("pulseData", "{\"MemberKeyStatistics\":{\"memberName\":\"" + MEMBER_NAME + "\"}}") .principal(principal) .accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))) .andExpect(status().isOk()).andExpect(jsonPath("$.MemberKeyStatistics.readPerSecTrend").isEmpty()) .andExpect(jsonPath("$.MemberKeyStatistics.cpuUsageTrend").isEmpty()) .andExpect(jsonPath("$.MemberKeyStatistics.memoryUsageTrend").isEmpty()) .andExpect(jsonPath("$.MemberKeyStatistics.writePerSecTrend").isEmpty()); }
From source file:com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.java
@Test public void pulseUpdateForMemberRegions() throws Exception { this.mockMvc/*ww w .j av a 2 s . com*/ .perform(post("/pulseUpdate") .param("pulseData", "{\"MemberRegions\":{\"memberName\":\"" + MEMBER_NAME + "\"}}") .principal(principal) .accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))) .andExpect(status().isOk()).andExpect(jsonPath("$.MemberRegions.name").value(MEMBER_NAME)) .andExpect(jsonPath("$.MemberRegions.memberRegions[0].fullPath").value(REGION_PATH)) .andExpect(jsonPath("$.MemberRegions.memberRegions[0].entryCount").value(0)) .andExpect(jsonPath("$.MemberRegions.memberRegions[0].name").value(REGION_NAME)) .andExpect(jsonPath("$.MemberRegions.memberRegions[0].diskStoreName").value("")) .andExpect(jsonPath("$.MemberRegions.memberRegions[0].gatewayEnabled").value(false)) .andExpect(jsonPath("$.MemberRegions.memberRegions[0].entrySize").value("0.0000")) .andExpect(jsonPath("$.MemberRegions.memberId").value(MEMBER_ID)) .andExpect(jsonPath("$.MemberRegions.status").value("Normal")); }
From source file:com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.java
@Test public void pulseUpdateForMembersList() throws Exception { this.mockMvc/* w w w . j a v a 2s . c om*/ .perform(post("/pulseUpdate") .param("pulseData", "{\"MembersList\":{\"memberName\":\"" + MEMBER_NAME + "\"}}") .principal(principal) .accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))) .andExpect(status().isOk()) .andExpect(jsonPath("$.MembersList.clusterMembers[0].name").value(MEMBER_NAME)) .andExpect(jsonPath("$.MembersList.clusterMembers[0].memberId").value(MEMBER_ID)) .andExpect(jsonPath("$.MembersList.clusterName").value(CLUSTER_NAME)); }
From source file:com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.java
@Test public void pulseUpdateForPulseVersion() throws Exception { this.mockMvc//from w w w .jav a 2 s .c o m .perform(post("/pulseUpdate").param("pulseData", "{\"PulseVersion\":\"{}\"}").principal(principal) .accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))) .andExpect(status().isOk()).andExpect(jsonPath("$.PulseVersion.sourceDate").value("not empty")) .andExpect(jsonPath("$.PulseVersion.sourceRepository").value("not empty")) .andExpect(jsonPath("$.PulseVersion.pulseVersion").value("not empty")) .andExpect(jsonPath("$.PulseVersion.sourceRevision").value("not empty")) .andExpect(jsonPath("$.PulseVersion.buildId").value("not empty")) .andExpect(jsonPath("$.PulseVersion.buildDate").value("not empty")); }
From source file:com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.java
@Test public void pulseUpdateForQueryStatistics() throws Exception { this.mockMvc//from w w w . j a va 2s .c om .perform( post("/pulseUpdate").param("pulseData", "{\"QueryStatistics\":\"{}\"}").principal(principal) .accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))) .andExpect(status().isOk()).andExpect(jsonPath("$.QueryStatistics.queriesList").isEmpty()) .andExpect(jsonPath("$.QueryStatistics.connectedFlag").value(false)) .andExpect(jsonPath("$.QueryStatistics.connectedErrorMsg").value("")); }
From source file:com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.java
@Test public void pulseUpdateForSystemAlerts() throws Exception { this.mockMvc//from w w w.ja v a 2 s . c om .perform(post("/pulseUpdate").param("pulseData", "{\"SystemAlerts\":{\"pageNumber\":\"1\"}}") .principal(principal) .accept(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE))) .andExpect(status().isOk()).andExpect(jsonPath("$.SystemAlerts.pageNumber").value(1)) .andExpect(jsonPath("$.SystemAlerts.connectedFlag").value(false)) .andExpect(jsonPath("$.SystemAlerts.connectedErrorMsg").value("")) .andExpect(jsonPath("$.SystemAlerts.systemAlerts").isEmpty()); }