private SmokeTestClassView createSmokeTestClassView(GapicInterfaceContext context) { String outputPath = PhpGapicCodePathMapper.newBuilder() .setPrefix("tests/System") .build() .getOutputPath(context.getInterfaceModel().getFullName(), context.getProductConfig()); SurfaceNamer namer = context.getNamer(); String name = namer.getSmokeTestClassName(context.getInterfaceConfig()); SmokeTestClassView.Builder testClass = createSmokeTestClassViewBuilder(context); testClass.name(name); testClass.outputPath(namer.getSourceFilePath(outputPath, name)); return testClass.build(); }
private List<ClientTestFileView> createUnitTestViews( ApiModel model, GapicProductConfig productConfig) { ImmutableList.Builder<ClientTestFileView> views = ImmutableList.builder(); SurfaceNamer namer = new RubySurfaceNamer(productConfig.getPackageName()); for (InterfaceModel apiInterface : model.getInterfaces()) { if (!productConfig.hasInterfaceConfig(apiInterface)) { continue; } GapicInterfaceContext context = createContext(apiInterface, productConfig); String testClassName = namer.getUnitTestClassName(context.getInterfaceConfig()); String outputPath = unitTestPathMapper.getOutputPath( context.getInterfaceModel().getFullName(), productConfig); ImportSectionView importSection = importSectionTransformer.generateTestImportSection(context); views.add( ClientTestFileView.newBuilder() .templateFileName(UNIT_TEST_TEMPLATE_FILE) .outputPath(namer.getSourceFilePath(outputPath, testClassName)) .testClass(createUnitTestClassView(context, model.hasMultipleServices())) .fileHeader( fileHeaderTransformer.generateFileHeader(productConfig, importSection, namer)) .apiVersion(packageConfig.apiVersion()) .build()); } return views.build(); }
String subPath = pathMapper.getSamplesOutputPath( context.getInterfaceModel().getFullName(), context.getProductConfig(), method.name()); for (MethodSampleView methodSample : method.samples()) { String callingForm = methodSample.callingForm().toLowerCamel();
view.servicePhraseName(namer.getServicePhraseName(interfaceConfig)); String outputPath = pathMapper.getOutputPath(apiInterface.getFullName(), productConfig); String fileName = namer.getServiceFileName(context.getInterfaceConfig()); view.outputPath(outputPath + File.separator + fileName);
String subPath = pathMapper.getSamplesOutputPath( context.getInterfaceModel().getFullName(), context.getProductConfig(), method.name()); for (MethodSampleView methodSample : method.samples()) { String callingForm = methodSample.callingForm().toLowerCamel();
String subPath = pathMapper.getSamplesOutputPath( context.getInterfaceModel().getFullName(), context.getProductConfig(), method.name()); for (MethodSampleView methodSample : method.samples()) { String callingForm = methodSample.callingForm().toLowerCamel();
context.getInterfaceModel().getFullName(), context.getProductConfig());
context.getInterfaceModel().getFullName(), context.getProductConfig()); apiImplClass.outputPath(outputPath + "/" + implName + ".php");
.setPrefix("tests/Unit") .build() .getOutputPath(context.getInterfaceModel().getFullName(), context.getProductConfig()); SurfaceNamer namer = context.getNamer(); String name = namer.getUnitTestClassName(context.getInterfaceConfig());
String outputPath = smokeTestPathMapper.getOutputPath( context.getInterfaceModel().getFullName(), context.getProductConfig()); SurfaceNamer namer = context.getNamer(); RubyPackageMetadataNamer metadataNamer =