com.autonomousapps.kit.package-info Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-testkit-support Show documentation
Show all versions of gradle-testkit-support Show documentation
A DSL for building test fixtures with Gradle TestKit
The newest version!
// Copyright (c) 2024. Tony Robalik.
// SPDX-License-Identifier: Apache-2.0
/**
* Testkit is a semantic wrapper around Gradle test fixtures. It is a way to generate Gradle projects, from build
* scripts through source code, for use when writing functional tests using Gradle TestKit.
*
*
* An example:
*
*
* class MyFixture : AbstractGradleProject() {
*
* val gradleProject: GradleProject
*
* init {
* val builder = newGradleProjectBuilder()
* .withSubProject("lib") {
* withBuildScript {
* plugins(Plugin.kotlin)
* dependencies(commonsIo("implementation"))
* }
* sources = listOf(
* Source(
* SourceType.JAVA, "Library", "com/example/library",
* """\
* package com.example.library;
*
* public class Library {
* }
* """.trimIndent()
* ),
* )
* }
*
* // This builds the builder and then writes it to disk in the default location (./build/functionalTest/)
* gradleProject = builder.write()
* }
* }
*
*
* @see Gradle TestKit
*/
package com.autonomousapps.kit;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy