public boolean shouldVerifyDataAfterTest() { return metadataExtractor.shouldMatchDataSet().isDefinedOnClassLevel() || metadataExtractor.shouldMatchDataSet().isDefinedOn(testMethod); }
public boolean shouldVerifyDataAfterTest() { return metadataExtractor.shouldMatchDataSet().isDefinedOnClassLevel() || metadataExtractor.shouldMatchDataSet().isDefinedOn(testMethod); }
public boolean shouldVerifyDataAfterTest() { return metadataExtractor.shouldMatchDataSet().isDefinedOnClassLevel() || metadataExtractor.shouldMatchDataSet().isDefinedOn(testMethod); }
private ShouldMatchDataSet getResourceAnnotation(Method testMethod) { return metadataExtractor.shouldMatchDataSet().fetchUsingFirst(testMethod); }
private ShouldMatchDataSet getResourceAnnotation(Method testMethod) { return metadataExtractor.shouldMatchDataSet().fetchUsingFirst(testMethod); }
private ShouldMatchDataSet getResourceAnnotation(Method testMethod) { return metadataExtractor.shouldMatchDataSet().fetchUsingFirst(testMethod); }
private boolean hasDataSetAnnotation() { return metadataExtractor.usingDataSet().isDefinedOnClassLevel() || metadataExtractor.usingDataSet().isDefinedOnAnyMethod() || metadataExtractor.shouldMatchDataSet().isDefinedOnClassLevel() || metadataExtractor.shouldMatchDataSet().isDefinedOnAnyMethod(); }
private boolean hasDataSetAnnotation() { return metadataExtractor.usingDataSet().isDefinedOnClassLevel() || metadataExtractor.usingDataSet().isDefinedOnAnyMethod() || metadataExtractor.shouldMatchDataSet().isDefinedOnClassLevel() || metadataExtractor.shouldMatchDataSet().isDefinedOnAnyMethod(); }
private boolean hasDataSetAnnotation() { return metadataExtractor.usingDataSet().isDefinedOnClassLevel() || metadataExtractor.usingDataSet().isDefinedOnAnyMethod() || metadataExtractor.shouldMatchDataSet().isDefinedOnClassLevel() || metadataExtractor.shouldMatchDataSet().isDefinedOnAnyMethod(); }
private boolean hasDataSetAnnotationOnClass() { return metadataExtractor.get().usingDataSet().isDefinedOnClassLevel() || metadataExtractor.get().shouldMatchDataSet().isDefinedOnClassLevel(); }
private boolean hasDataSetAnnotation(final Method method) { return metadataExtractor.get().usingDataSet().isDefinedOn(method) || metadataExtractor.get().shouldMatchDataSet().isDefinedOn(method); }
private boolean hasDataSetAnnotation(final Method method) { return metadataExtractor.get().usingDataSet().isDefinedOn(method) || metadataExtractor.get().shouldMatchDataSet().isDefinedOn(method); }
private boolean hasDataSetAnnotationOnClass() { return metadataExtractor.get().usingDataSet().isDefinedOnClassLevel() || metadataExtractor.get().shouldMatchDataSet().isDefinedOnClassLevel(); }
private boolean hasDataSetAnnotationOnClass() { return metadataExtractor.get().usingDataSet().isDefinedOnClassLevel() || metadataExtractor.get().shouldMatchDataSet().isDefinedOnClassLevel(); }
private boolean hasDataSetAnnotation(final Method method) { return metadataExtractor.get().usingDataSet().isDefinedOn(method) || metadataExtractor.get().shouldMatchDataSet().isDefinedOn(method); }
private String getDefaultFileName(Method testMethod) { Format format = configuration.getDefaultDataSetFormat(); if (metadataExtractor.shouldMatchDataSet().isDefinedOn(testMethod)) { return new ExpectedDataSetFileNamingStrategy(format).createFileName(metadataExtractor.getJavaClass(), testMethod); } return new ExpectedDataSetFileNamingStrategy(format).createFileName(metadataExtractor.getJavaClass()); }
private String getDefaultFileName(Method testMethod) { Format format = configuration.getDefaultDataSetFormat(); if (metadataExtractor.shouldMatchDataSet().isDefinedOn(testMethod)) { return new ExpectedDataSetFileNamingStrategy(format).createFileName(metadataExtractor.getJavaClass(), testMethod); } return new ExpectedDataSetFileNamingStrategy(format).createFileName(metadataExtractor.getJavaClass()); }
private String getDefaultFileName(Method testMethod) { Format format = configuration.getDefaultDataSetFormat(); if (metadataExtractor.shouldMatchDataSet().isDefinedOn(testMethod)) { return new ExpectedDataSetFileNamingStrategy(format).createFileName(metadataExtractor.getJavaClass(), testMethod); } return new ExpectedDataSetFileNamingStrategy(format).createFileName(metadataExtractor.getJavaClass()); } }
public void verifyDatabase(@Observes(precedence = 30) AfterPersistenceTest afterPersistenceTest) { PersistenceExtensionFeatureResolver persistenceExtensionFeatureResolver = persistenceExtensionFeatureResolverInstance.get(); if (persistenceExtensionFeatureResolver.shouldVerifyDataAfterTest()) { final MetadataExtractor metadataExtractor = metadataExtractorInstance.get(); final ExpectedDataSetProvider dataSetProvider = new ExpectedDataSetProvider(metadataExtractor, configurationInstance.get()); final Method testMethod = afterPersistenceTest.getTestMethod(); final ShouldMatchDataSet dataSetsToVerify = metadataExtractor.shouldMatchDataSet() .fetchFrom(testMethod); compareDataEvent.fire(new CompareData(dataSetProvider.getDescriptorsDefinedFor(testMethod), dataSetsToVerify.orderBy(), dataSetsToVerify.excludeColumns())); } }
public void verifyDatabase(@Observes(precedence = 30) AfterPersistenceTest afterPersistenceTest) { PersistenceExtensionFeatureResolver persistenceExtensionFeatureResolver = persistenceExtensionFeatureResolverInstance.get(); if (persistenceExtensionFeatureResolver.shouldVerifyDataAfterTest()) { final MetadataExtractor metadataExtractor = metadataExtractorInstance.get(); final ExpectedDataSetProvider dataSetProvider = new ExpectedDataSetProvider(metadataExtractor, configurationInstance.get()); final Method testMethod = afterPersistenceTest.getTestMethod(); final ShouldMatchDataSet dataSetsToVerify = metadataExtractor.shouldMatchDataSet() .fetchFrom(testMethod); final CustomColumnFilter customColumnFilter = metadataExtractor.using(CustomColumnFilter.class).fetchFrom(testMethod); final CompareDBUnitData compareDBUnitDataEvent = new CompareDBUnitData(dataSetProvider.getDescriptorsDefinedFor(testMethod), dataSetsToVerify.orderBy(), dataSetsToVerify.excludeColumns()); if (customColumnFilter != null) { compareDBUnitDataEvent.add(customColumnFilter.value()); } compareDataEvent.fire(compareDBUnitDataEvent); } }