本文整理汇总了Java中org.springframework.web.util.NestedServletException.getCause方法的典型用法代码示例。如果您正苦于以下问题:Java NestedServletException.getCause方法的具体用法?Java NestedServletException.getCause怎么用?Java NestedServletException.getCause使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.web.util.NestedServletException
的用法示例。
在下文中一共展示了NestedServletException.getCause方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGetSwitchInfo
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testGetSwitchInfo()
throws Throwable
{
try
{
this.mockMvc.perform( get( "http://localhost:8080/napi/switches/S1" ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例2: testUpdateSwitchPortConfig
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testUpdateSwitchPortConfig()
throws Throwable
{
try
{
this.mockMvc.perform( put( "http://localhost:8080/napi/switches/S1/ports/swp1" ).content( mapper.writeValueAsString( HmsAggregatorDummyDataProvider.getNBSwitchPortConfig() ).getBytes() ).accept( MediaType.APPLICATION_JSON ).contentType( MediaType.APPLICATION_JSON ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例3: testCreateOrUpdateSwitchBgpConfig
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testCreateOrUpdateSwitchBgpConfig()
throws Throwable
{
try
{
this.mockMvc.perform( put( "http://localhost:8080/napi/switches/S1/bgp" ).content( mapper.writeValueAsString( HmsAggregatorDummyDataProvider.getNBSwitchBgpConfig() ).getBytes() ).accept( MediaType.APPLICATION_JSON ).contentType( MediaType.APPLICATION_JSON ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例4: testGetAllSwitchInfos
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testGetAllSwitchInfos()
throws Throwable
{
try
{
this.mockMvc.perform( get( "http://localhost:8080/napi/switches/" ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例5: testGetSwitchOspfv2Config
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testGetSwitchOspfv2Config()
throws Throwable
{
try
{
this.mockMvc.perform( get( "http://localhost:8080/napi/switches/S1/ospfv2" ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例6: testCreateOrUpdateSwitchOspfv2Config
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testCreateOrUpdateSwitchOspfv2Config()
throws Throwable
{
try
{
this.mockMvc.perform( put( "http://localhost:8080/napi/switches/S1/ospfv2" ).content( mapper.writeValueAsString( HmsAggregatorDummyDataProvider.getNBSwitchOspfv2Config() ).getBytes() ).accept( MediaType.APPLICATION_JSON ).contentType( MediaType.APPLICATION_JSON ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例7: testDeleteSwitchOspfv2Config
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testDeleteSwitchOspfv2Config()
throws Throwable
{
try
{
this.mockMvc.perform( delete( "http://localhost:8080/napi/switches/S1/ospfv2" ).accept( MediaType.APPLICATION_JSON ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例8: testGetSwitchMcLagConfig
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testGetSwitchMcLagConfig()
throws Throwable
{
try
{
this.mockMvc.perform( get( "http://localhost:8080/napi/switches/S1/mclag" ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例9: testDeleteSwitchMcLagConfig
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testDeleteSwitchMcLagConfig()
throws Throwable
{
try
{
this.mockMvc.perform( delete( "http://localhost:8080/napi/switches/S1/mclag" ).accept( MediaType.APPLICATION_JSON ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例10: testGetSwitchLagConfig
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testGetSwitchLagConfig()
throws Throwable
{
try
{
this.mockMvc.perform( get( "http://localhost:8080/napi/switches/S1/lags/bd-test" ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例11: testCreateOrUpdateSwitchLagConfig
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testCreateOrUpdateSwitchLagConfig()
throws Throwable
{
try
{
this.mockMvc.perform( put( "http://localhost:8080/napi/switches/S1/lags/" ).content( mapper.writeValueAsString( HmsAggregatorDummyDataProvider.getNBSwitchLagConfig() ).getBytes() ).accept( MediaType.APPLICATION_JSON ).contentType( MediaType.APPLICATION_JSON ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例12: testDeleteSwitchLagConfig
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testDeleteSwitchLagConfig()
throws Throwable
{
try
{
this.mockMvc.perform( delete( "http://localhost:8080/napi/switches/S1/lags/bd-test" ).accept( MediaType.APPLICATION_JSON ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例13: testGetSwitchAllLagsConfigs
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testGetSwitchAllLagsConfigs()
throws Throwable
{
try
{
this.mockMvc.perform( get( "http://localhost:8080/napi/switches/S1/lags" ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例14: testGetSwitchVlanConfig
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testGetSwitchVlanConfig()
throws Throwable
{
try
{
this.mockMvc.perform( get( "http://localhost:8080/napi/switches/S1/vlans/2011" ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}
示例15: testCreateOrUpdateSwitchVlanConfig
import org.springframework.web.util.NestedServletException; //导入方法依赖的package包/类
@Test( expected = NullPointerException.class )
public void testCreateOrUpdateSwitchVlanConfig()
throws Throwable
{
try
{
this.mockMvc.perform( put( "http://localhost:8080/napi/switches/S1/vlans" ).content( mapper.writeValueAsString( HmsAggregatorDummyDataProvider.getNBSwitchVlanConfig() ).getBytes() ).accept( MediaType.APPLICATION_JSON ).contentType( MediaType.APPLICATION_JSON ) ).andReturn();
}
catch ( NestedServletException e )
{
assertNotNull( e );
assertNotNull( e.getCause() );
assertTrue( e.getCause() instanceof NullPointerException );
throw e.getCause();
}
throw new Exception( "failed" );
}