Skip to content
mutastic

Suggestion

record in io.mutastic.api

record Suggestion(
String call,
List<String> parameters,
List<Long> inputs,
List<Suggestion.Instance> receiver,
String today,
String mutated)

A call that tells a missed mutant from the code today, found by running both: the test to write is an assertion of today’s value. Today’s value is what the code does, not necessarily what it should, so the person checks it before keeping the test.

Components

callthe call as Java source, new Pricing().discount(100)
parametersthe method’s parameter names, in order
inputsthe arguments, one per parameter
receiverthe instances made to call the method on, outermost first: the receiver, after the outer class’s instance it’s made in if it’s an inner class; empty for a static method
todaywhat the call returns today, as Java source: 10, true, "text", throws java.lang.IllegalStateException
mutatedwhat it returns with the mutant in, the same way, or doesn't return

Constructors

Suggestion

Suggestion(String call, List<String> parameters, List<Long> inputs, String today, String mutated)

A call with no receiver arguments: a static method, or a no-argument constructor.

Methods

receiverTakesArguments

boolean receiverTakesArguments()

Whether making the receiver takes any arguments.

returnsValue

boolean returnsValue()

Whether today’s result is a value (not an exception), which an assertion can pin.