naver / fixture-monkey

Let Fixture Monkey generate test instances including edge cases automatically
https://naver.github.io/fixture-monkey
Apache License 2.0
575 stars 90 forks source link

Refactor customizeProperty works in order #1014

Closed seongahjo closed 3 months ago

seongahjo commented 3 months ago

Summary

Refactor customizeProperty works in order

(Optional): Description

ArbitraryBuilder API customizeProperty is affected by order from 1.1.0.

For example, the results of two examples are different.

.setExp(StringValue::value, "abcdef")
.customizeProperty(typedString<String>("value")) {
    it.map { str -> str.substring(0..2) }
}

result -> `abc`
.customizeProperty(typedString<String>("value")) {
    it.filter { value -> value.length > 5 }
}
.setExp(StringValue::value, "fixed")

result -> "fixed"

How Has This Been Tested?

Is the Document updated?

Later