package Ġcom . pr erna . news app kotlin . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . room . Room Ċ import Ġcom . pr erna . news app kotlin . db . Article Database Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . h ilt . Install In Ċ import Ġdagger . h ilt . android . qual ifiers . ApplicationContext Ċ import Ġdagger . h ilt . components . Singleton Component Ċ import Ġjavax . inject . Named ĊĊ Ċ @ Module Ċ @ Install In ( Singleton Component :: class ) Ċ object ĠTest App Module Ġ{ ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Named (" test _ db ") ĊĠĠĠ Ġfun Ġprovide InMemory Db (@ ApplicationContext Ġcontext : ĠContext ) Ġ= ĊĠĠĠĠĠĠĠ ĠRoom . in Memory Database Builder ( context , ĠArticle Database :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. allow MainThread Queries () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () Ċ }