<commit_before>package org.koin.test

import org.koin.Koin
import org.koin.KoinContext
import org.koin.dsl.module.Module
import org.koin.error.BeanInstanceCreationException
import org.koin.standalone.KoinComponent
import org.koin.standalone.StandAloneContext

interface KoinTest : KoinComponent

/**
 * Get a dependency
 * @throws NoBeanDefFoundException if definition can't be found
 * @throws BeanInstanceCreationException if cant create
 * @param name
 */
inline fun <reified T> KoinTest.get(name: String = "") = (StandAloneContext.koinContext as KoinContext).get<T>(name)

/**
 * Get a property
 * @throws MissingPropertyException if not found
 * @param name
 */
inline fun <reified T> KoinTest.getProperty(name: String = "") = (StandAloneContext.koinContext as KoinContext).getProperty<T>(name)

/**
 * Get a property - with default value if not found
 * @param name
 * @param defaultValue
 */
inline fun <reified T> KoinTest.getProperty(name: String = "", defaultValue: T) = (StandAloneContext.koinContext as KoinContext).getProperty(name, defaultValue)

/**
 * Dry Run Starter
 */
fun KoinTest.dryRun(modules: List<Module>) {
    StandAloneContext.koinContext = Koin().build(modules)
    (StandAloneContext.koinContext as KoinContext).dryRun()
}<commit_msg>[test] dryRun should not be a starter<commit_after>package org.koin.test

import org.koin.KoinContext
import org.koin.error.BeanInstanceCreationException
import org.koin.standalone.KoinComponent
import org.koin.standalone.StandAloneContext

interface KoinTest : KoinComponent

/**
 * Get a dependency
 * @throws NoBeanDefFoundException if definition can't be found
 * @throws BeanInstanceCreationException if cant create
 * @param name
 */
inline fun <reified T> KoinTest.get(name: String = "") = (StandAloneContext.koinContext as KoinContext).get<T>(name)

/**
 * Get a property
 * @throws MissingPropertyException if not found
 * @param name
 */
inline fun <reified T> KoinTest.getProperty(name: String = "") = (StandAloneContext.koinContext as KoinContext).getProperty<T>(name)

/**
 * Get a property - with default value if not found
 * @param name
 * @param defaultValue
 */
inline fun <reified T> KoinTest.getProperty(name: String = "", defaultValue: T) = (StandAloneContext.koinContext as KoinContext).getProperty(name, defaultValue)

/**
 * Make a Dry Run - Test if each definition is injectable
 */
fun KoinTest.dryRun() {
    (StandAloneContext.koinContext as KoinContext).dryRun()
}
{'fraction_non_alphanumeric': 0.10785510785510785, 'fraction_numerical': 0.0, 'mean_word_length': 5.175879396984925, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2397258', 'n_tokens_mistral': 751, 'n_tokens_neox': 745, 'n_words': 202}