Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
21393ab
Move all util methods into a separate module
ArsenHD Jul 14, 2022
e613702
Split util methods and data providers into two separate regions.
ArsenHD Jul 21, 2022
d9ff922
Create CgElements for regular classes (not just test classes)
ArsenHD Aug 5, 2022
06ed384
Update util method providers
ArsenHD Aug 5, 2022
d7d0df9
Support util class generation in plugin
ArsenHD Aug 8, 2022
9c501c1
Simplify some util methods checks
ArsenHD Aug 10, 2022
c0e1161
Collect required util methods regardless of util method provider
ArsenHD Aug 10, 2022
c2ba7a0
Put information about whether mocks were used into CodeGenerationResult
ArsenHD Aug 10, 2022
3956238
Carefully consider different cases when generating an util class
ArsenHD Aug 10, 2022
54f8a86
Update util methods collection in code generation taking into account…
ArsenHD Aug 10, 2022
1b8212b
Simplify util method kinds
ArsenHD Aug 11, 2022
51a09f7
Generate tests with and without separate util class when running all …
ArsenHD Aug 11, 2022
227c971
Check multiple test source roots for util class to avoid util class d…
ArsenHD Aug 12, 2022
233f24d
Support isStatic and isNested flags in CgRegularClass and its builder
ArsenHD Aug 12, 2022
3e6811d
Drop unused imports and property
ArsenHD Aug 12, 2022
ac193b9
Fix wrong property name
ArsenHD Aug 12, 2022
29b2d29
Use outermost test class for test class util method provider and rend…
ArsenHD Aug 12, 2022
721e983
Do render nested classes in Java and Kotlin
ArsenHD Aug 12, 2022
c0d48b3
Fix obtaining exception types of util methods
ArsenHD Aug 12, 2022
39e77be
Remove utbot-codegen-utils library, because now we will work with a s…
ArsenHD Aug 12, 2022
61c2b42
Fix code generator pipeline for cases when util class is generated se…
ArsenHD Aug 12, 2022
abda14d
TODO: uncommit, there are some unfinished todo's
ArsenHD Aug 17, 2022
65b34da
Obtain version comment from utils class, not file
ArsenHD Aug 18, 2022
286e54c
Remove unnecеssary 'open' modifier
ArsenHD Aug 22, 2022
62c76c6
Remove unnecessary file for class Patterns
ArsenHD Aug 22, 2022
2b51d74
Add documentation for CgRegularClass
ArsenHD Aug 22, 2022
694e018
Add documentation for CgRegularClass
ArsenHD Aug 22, 2022
b9c740d
Store version of util class in a comment and use it to decide whether…
ArsenHD Aug 23, 2022
d463ae2
Store kind of util class in a comment to obtain the kind of an existi…
ArsenHD Aug 23, 2022
1c01865
Fix incorrect import
ArsenHD Aug 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Move all util methods into a separate module
This commit moves all util methods that have previously been in the test class into a separate module. This module is built into a shadow jar which needs to be added into the user's project dependencies in order for our generated tests to be able to use its functionality.
  • Loading branch information
ArsenHD committed Aug 31, 2022
commit 21393aba78b5933994a052d556a6640807aad157
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pluginManagement {

rootProject.name = 'utbot'

include 'utbot-codegen-utils'
include 'utbot-core'
include 'utbot-framework'
include 'utbot-framework-api'
Expand Down
16 changes: 16 additions & 0 deletions utbot-codegen-utils/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
id "com.github.johnrengelman.shadow" version "6.1.0"
}

apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"

shadowJar {
configurations = [project.configurations.compileClasspath]
archiveVersion.set(codegen_utils_version)
archiveClassifier.set('')
minimize()
}

dependencies {
compileOnly group: 'org.mockito', name: 'mockito-core', version: mockito_version
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.utbot.framework.codegen.utils;

final class MockUtils {
private MockUtils() {}

// TODO: for now we have only Mockito but it can be changed in the future
public static boolean isMock(Object obj) {
return org.mockito.Mockito.mockingDetails(obj).isMock();
}
}
Loading