test_class.declarator: basedir
test_class.modifier: private
test_class.original_string: private String basedir;
test_class.type: String
test_class.var_name: basedir
test_class.file: oneops-model/src/test/java/com/oneops/yaml/OneOpsYamlReaderTest.java
test_class.identifier: OneOpsYamlReaderTest
test_case.body: @Test
    public void validateReadingTestOldBooYaml1() throws Exception {
      OneOpsYamlReader reader = new OneOpsYamlReader();
      BooYaml booYaml = reader.read(yaml("src/test/yaml/boo", "assembly.yaml"), BooYaml.class);
      assertEquals(booYaml.getBoo().getEnvironment_name(), "environment_name");
      Map<String, String> tags = Maps.newHashMap();
      tags.put("tag-key1", "tag-value1");
      tags.put("tag-key2", "tag-value2");
      tags.put("tag-key3", "tag-value3");
      tags.put("tag-key4", "tag-value4");
      assertEquals(booYaml.getAssembly().getTags(), tags);
  
      List<BooPlatform> platformList = booYaml.getPlatformList();
      BooPlatform booPlatform0 = platformList.get(0);
      assertEquals(booPlatform0.getName(), "platform-0");
      assertEquals(booPlatform0.getPack(), "pack-platform-0");
      assertEquals(booPlatform0.getSource(), "source");
  
      Map<String, Map<String, Object>> components = booPlatform0.getComponents();
      Map<String, Object> component0 = components.get("component-0");
      assertEquals(component0.get("config-0"), "platform-0-config-0-value");
  
      Map<String, BooAttachment> attachments = booPlatform0.getAttachments();
      BooAttachment booAttachment = attachments.get("component-0");
      assertEquals(booAttachment.getName(), "attachment1");
  
      Map<String, Object> user = components.get("user");
      Map<String, String> userComp = Maps.newHashMap();
      userComp.put("username", "user1");
      userComp.put("authorized_keys", "[\"\"]");
      assertEquals(user.get("user1"), userComp);
  
      List<BooScale> scaleList = booYaml.getScaleList();
      BooScale booScale = scaleList.get(0);
      assertEquals(booScale.getPlatformName(), "platform-0");
      assertEquals(booScale.getComponentName(), "compute");
      assertEquals(booScale.getMin(), "2");
      assertEquals(booScale.getCurrent(), "2");
  
      List<BooEnvironment> environmentList = booYaml.getEnvironmentList();
      BooEnvironment environment0 = environmentList.get(0);
      assertEquals(environment0.getName(), booYaml.getBoo().getEnvironment_name());
      assertEquals(environment0.getProfile(), "DEV");
  
      List<BooCloud> cloudList = environment0.getCloudList();
      BooCloud cloud0 = cloudList.get(0);
      assertEquals(cloud0.getName(), "dev-cdc002");
      assertEquals(cloud0.getPriority(), "1");
      assertEquals(cloud0.getDpmt_order(), "1");
      assertEquals(cloud0.getPct_scale(), "30");
  
      List<BooPlatform> ep0 = environment0.getPlatformList();
      BooPlatform ep = ep0.get(0);
      assertEquals(ep.getName(), "platform-0");
      Map<String, String> autoHealing = Maps.newHashMap();
      autoHealing.put("autorepair", "false");
      autoHealing.put("autoreplace", "true");
      autoHealing.put("replace_after_minutes", "60");
      autoHealing.put("replace_after_repairs", "4");
      assertEquals(ep.getAuto_healing(), autoHealing);
  
      Map<String, Map<String, Object>> epc0 = ep.getComponents();
      Map<String, Object> lbConfig = epc0.get("lb");
      assertEquals(lbConfig.get("ecv_map"), "{\"8080\":\"GET /\"}");
  
      BooModelTransformer bmt = new BooModelTransformer();
      OneOps oneops = bmt.convert(booYaml);
  
      assertEquals("auth-key", oneops.getApikey());
      assertEquals("https://localhost:9000/", oneops.getHost());
      assertEquals("local-org", oneops.getOrganization());
  
      Assembly assembly = oneops.getAssembly();
      // Assembly
      assertEquals("assembly-name", assembly.getName());
  
    }
test_case.class_method_signature: OneOpsYamlReaderTest.validateReadingTestOldBooYaml1()
test_case.full_signature: @Test public void validateReadingTestOldBooYaml1()
test_case.identifier: validateReadingTestOldBooYaml1
test_case.invocations: read yaml assertEquals getEnvironment_name getBoo newHashMap put put put put assertEquals getTags getAssembly getPlatformList get assertEquals getName assertEquals getPack assertEquals getSource getComponents get assertEquals get getAttachments get assertEquals getName get newHashMap put put assertEquals get getScaleList get assertEquals getPlatformName assertEquals getComponentName assertEquals getMin assertEquals getCurrent getEnvironmentList get assertEquals getName getEnvironment_name getBoo assertEquals getProfile getCloudList get assertEquals getName assertEquals getPriority assertEquals getDpmt_order assertEquals getPct_scale getPlatformList get assertEquals getName newHashMap put put put put assertEquals getAuto_healing getComponents get assertEquals get convert assertEquals getApikey assertEquals getHost assertEquals getOrganization getAssembly assertEquals getName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void validateReadingTestOldBooYaml1()
focal_class.file: oneops-model/src/main/java/com/oneops/yaml/OneOpsYamlReader.java
focal_class.identifier: OneOpsYamlReader
focal_class.class_method_signature: OneOpsYamlReader.read(File yamlfile, Class<T> yamlModelClass)
focal_class.full_signature: public T read(File yamlfile, Class<T> yamlModelClass)
focal_class.identifier: read
focal_class.modifiers: public
focal_class.parameters: (File yamlfile, Class<T> yamlModelClass)
focal_class.return: T
focal_class.signature: T read(File yamlfile, Class<T> yamlModelClass)
focal_method.body: public <T> T read(File yamlfile, Class<T> yamlModelClass) throws FileNotFoundException {
      Yaml yaml = new Yaml();
      T yamlmodel = yaml.loadAs(new FileInputStream(yamlfile), yamlModelClass);
      return yamlmodel;
    }
focal_method.class_method_signature: OneOpsYamlReader.read(File yamlfile, Class<T> yamlModelClass)
focal_method.full_signature: public T read(File yamlfile, Class<T> yamlModelClass)
focal_method.identifier: read
focal_method.invocations: loadAs
focal_method.modifiers: public
focal_method.parameters: (File yamlfile, Class<T> yamlModelClass)
focal_method.return: T
focal_method.signature: T read(File yamlfile, Class<T> yamlModelClass)