Search in sources :

Example 1 with UnitTestsModel

use of com.android.tools.idea.gradle.dsl.model.android.testOptions.UnitTestsModel in project android by JetBrains.

the class TestOptionsModel method unitTests.

@NotNull
public UnitTestsModel unitTests() {
    UnitTestsDslElement unitTestsDslElement = myDslElement.getPropertyElement(UNIT_TESTS_BLOCK_NAME, UnitTestsDslElement.class);
    if (unitTestsDslElement == null) {
        unitTestsDslElement = new UnitTestsDslElement(myDslElement);
        myDslElement.setNewElement(UNIT_TESTS_BLOCK_NAME, unitTestsDslElement);
    }
    return new UnitTestsModel(unitTestsDslElement);
}
Also used : UnitTestsModel(com.android.tools.idea.gradle.dsl.model.android.testOptions.UnitTestsModel) UnitTestsDslElement(com.android.tools.idea.gradle.dsl.parser.android.testOptions.UnitTestsDslElement) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

UnitTestsModel (com.android.tools.idea.gradle.dsl.model.android.testOptions.UnitTestsModel)1 UnitTestsDslElement (com.android.tools.idea.gradle.dsl.parser.android.testOptions.UnitTestsDslElement)1 NotNull (org.jetbrains.annotations.NotNull)1