test_class.declarator: fixtureStore
test_class.original_string: DefaultFixturesStore fixtureStore;
test_class.type: DefaultFixturesStore
test_class.var_name: fixtureStore
test_class.file: beanmother-core/src/test/java/io/beanmother/core/loader/store/DefaultFixturesStoreTest.java
test_class.identifier: DefaultFixturesStoreTest
test_case.body: @Test
      public void testAddLocation() throws IOException {
          String fixturePath = "fixtures/animals/pets";
          fixtureStore.addLocation(new Location(fixturePath));
  
          assertTrue(fixtureStore.getFixtureLocations().contains(new Location(fixturePath)));
  
          List<String> fileNames = new ArrayList<>();
          for(File file : fixtureStore.getFixtureFiles()) {
              fileNames.add(file.getName());
          }
  
          assertTrue(fileNames.contains("cat.yml"));
          assertTrue(fileNames.contains("dog.yml"));
      }
test_case.class_method_signature: DefaultFixturesStoreTest.testAddLocation()
test_case.full_signature: @Test public void testAddLocation()
test_case.identifier: testAddLocation
test_case.invocations: addLocation assertTrue contains getFixtureLocations getFixtureFiles add getName assertTrue contains assertTrue contains
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAddLocation()
focal_class.declarator: logger = LoggerFactory.getLogger(DefaultFixtureMapper.class)
focal_class.modifier: private final static
focal_class.original_string: private final static Logger logger = LoggerFactory.getLogger(DefaultFixtureMapper.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: fixtureScanner
focal_class.modifier: private
focal_class.original_string: private FixtureScanner fixtureScanner;
focal_class.type: FixtureScanner
focal_class.var_name: fixtureScanner
focal_class.declarator: fixtureParser
focal_class.modifier: private
focal_class.original_string: private FixtureParser fixtureParser;
focal_class.type: FixtureParser
focal_class.var_name: fixtureParser
focal_class.declarator: fixtureLocations
focal_class.modifier: private
focal_class.original_string: private Set<Location> fixtureLocations;
focal_class.type: Set<Location>
focal_class.var_name: fixtureLocations
focal_class.declarator: fixtureFiles
focal_class.modifier: private
focal_class.original_string: private Set<File> fixtureFiles;
focal_class.type: Set<File>
focal_class.var_name: fixtureFiles
focal_class.declarator: fixtureMaps
focal_class.modifier: private
focal_class.original_string: private Map<String, FixtureMap> fixtureMaps;
focal_class.type: Map<String, FixtureMap>
focal_class.var_name: fixtureMaps
focal_class.file: beanmother-core/src/main/java/io/beanmother/core/loader/store/DefaultFixturesStore.java
focal_class.identifier: DefaultFixturesStore
focal_class.interfaces: implements FixturesStore
focal_class.class_method_signature: DefaultFixturesStore.DefaultFixturesStore()
focal_class.full_signature: public  DefaultFixturesStore()
focal_class.identifier: DefaultFixturesStore
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  DefaultFixturesStore()
focal_class.class_method_signature: DefaultFixturesStore.DefaultFixturesStore(FixtureScanner fixtureScanner, FixtureParser fixtureParser)
focal_class.full_signature: public  DefaultFixturesStore(FixtureScanner fixtureScanner, FixtureParser fixtureParser)
focal_class.identifier: DefaultFixturesStore
focal_class.modifiers: public
focal_class.parameters: (FixtureScanner fixtureScanner, FixtureParser fixtureParser)
focal_class.signature:  DefaultFixturesStore(FixtureScanner fixtureScanner, FixtureParser fixtureParser)
focal_class.class_method_signature: DefaultFixturesStore.get(String fixtureKey)
focal_class.full_signature: @Override public FixtureMap get(String fixtureKey)
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: (String fixtureKey)
focal_class.return: FixtureMap
focal_class.signature: FixtureMap get(String fixtureKey)
focal_class.class_method_signature: DefaultFixturesStore.reproduce(String fixtureKey)
focal_class.full_signature: @Override public FixtureMap reproduce(String fixtureKey)
focal_class.identifier: reproduce
focal_class.modifiers: @Override public
focal_class.parameters: (String fixtureKey)
focal_class.return: FixtureMap
focal_class.signature: FixtureMap reproduce(String fixtureKey)
focal_class.class_method_signature: DefaultFixturesStore.exists(String fixtureKey)
focal_class.full_signature: @Override public boolean exists(String fixtureKey)
focal_class.identifier: exists
focal_class.modifiers: @Override public
focal_class.parameters: (String fixtureKey)
focal_class.return: boolean
focal_class.signature: boolean exists(String fixtureKey)
focal_class.class_method_signature: DefaultFixturesStore.addLocation(Location location)
focal_class.full_signature: @Override public void addLocation(Location location)
focal_class.identifier: addLocation
focal_class.modifiers: @Override public
focal_class.parameters: (Location location)
focal_class.return: void
focal_class.signature: void addLocation(Location location)
focal_class.class_method_signature: DefaultFixturesStore.reset()
focal_class.full_signature: @Override public void reset()
focal_class.identifier: reset
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reset()
focal_class.class_method_signature: DefaultFixturesStore.getFixtureLocations()
focal_class.full_signature: public Set<Location> getFixtureLocations()
focal_class.identifier: getFixtureLocations
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<Location>
focal_class.signature: Set<Location> getFixtureLocations()
focal_class.class_method_signature: DefaultFixturesStore.getFixtureFiles()
focal_class.full_signature: public Set<File> getFixtureFiles()
focal_class.identifier: getFixtureFiles
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<File>
focal_class.signature: Set<File> getFixtureFiles()
focal_class.class_method_signature: DefaultFixturesStore.getFixtureMaps()
focal_class.full_signature: public Map<String, FixtureMap> getFixtureMaps()
focal_class.identifier: getFixtureMaps
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, FixtureMap>
focal_class.signature: Map<String, FixtureMap> getFixtureMaps()
focal_method.body: @Override
      public void addLocation(Location location) {
          if (fixtureLocations.contains(location)) {
              logger.debug(location.getDescriptor() + " is already added.");
              return;
          }
  
          List<File> files = fixtureScanner.scan(location);
  
          if (files.size() == 0) {
              logger.warn("can not find any fixture file in " + location.getDescriptor());
              return;
          }
  
          Map<String, FixtureMap> parsed = new HashMap<>();
          for (File file : files) {
              if (fixtureFiles.contains(file)) continue;
              String fixtureStr;
              try {
                  fixtureStr = new String(Files.readAllBytes(Paths.get(file.getAbsolutePath())));
              } catch (IOException e) {
                  throw new RuntimeException("can not read " + file.getAbsolutePath(), e);
              }
              parsed.putAll(fixtureParser.parse(fixtureStr));
          }
  
          fixtureFiles.addAll(files);
          fixtureLocations.add(location);
          fixtureMaps.putAll(parsed);
      }
focal_method.class_method_signature: DefaultFixturesStore.addLocation(Location location)
focal_method.full_signature: @Override public void addLocation(Location location)
focal_method.identifier: addLocation
focal_method.invocations: contains debug getDescriptor scan size warn getDescriptor contains readAllBytes get getAbsolutePath getAbsolutePath putAll parse addAll add putAll
focal_method.modifiers: @Override public
focal_method.parameters: (Location location)
focal_method.return: void
focal_method.signature: void addLocation(Location location)