_@NoDatabase
Description
- Prevents the database feature from being used for the annotated test class or test method.
- If a method is within scope of aÂ
@NoDatabase
annotation, but one or more of the operations in the method require database support, anERR_MISSING_DATABASE_SUPPORT
error is returned at runtime.
Attributes
Attribute Name | Required? | Possible Values | Info |
---|---|---|---|
NONE | Â | Â | No attributes |
Location in the test class file
- Before a class declaration.
- Before a method declaration.
Examples
Â
@NoDatabase at the class level
@NoDatabase
class bool_or_other
{
   ...
}
@NoDatabase at the method level
@Database(id: 'edw', modes: ['lkp'])
class bool_no_other
{
@Description(description: 'This test uses the database')
  Â
@Test
method1()
{
...
...
}
@Description(description: 'This test uses no database')
Â
@NoDatabase
@Test
method2()
{
...
}
}
Â