@Test public void testMethod() throws Exception { ThriftStructMetadata metadata = testStructMetadataBuild(BonkMethod.class, 0, 1); verifyParameterInjection(metadata, 1, "message", 0); verifyMethodExtraction(metadata, 1, "message", "getMessage"); verifyParameterInjection(metadata, 2, "type", 1); verifyMethodExtraction(metadata, 2, "type", "getType"); }
@Test public void testBuilder() throws Exception { ThriftStructMetadata metadata = testStructMetadataBuild(BonkBuilder.class, 0, 2); verifyParameterInjection(metadata, 1, "message", 0); verifyMethodExtraction(metadata, 1, "message", "getMessage"); verifyParameterInjection(metadata, 2, "type", 0); verifyMethodExtraction(metadata, 2, "type", "getType"); }
@Test public void testBean() throws Exception { ThriftStructMetadata metadata = testStructMetadataBuild(BonkBean.class, 0, 2); verifyParameterInjection(metadata, 1, "message", 0); verifyMethodExtraction(metadata, 1, "message", "getMessage"); verifyParameterInjection(metadata, 2, "type", 0); verifyMethodExtraction(metadata, 2, "type", "getType"); }
@Test public void testConstructor() throws Exception { ThriftStructMetadata metadata = testStructMetadataBuild(BonkConstructor.class, 2, 0); verifyParameterInjection(metadata, 1, "message", 0); verifyMethodExtraction(metadata, 1, "message", "getMessage"); verifyParameterInjection(metadata, 2, "type", 1); verifyMethodExtraction(metadata, 2, "type", "getType"); }