AbstractObjectChecker.java

1
package com.github.dakusui.pcond.core.fluent;
2
3
import com.github.dakusui.pcond.core.refl.MethodQuery;
4
import com.github.dakusui.pcond.forms.Predicates;
5
6
import static com.github.dakusui.pcond.forms.Functions.parameter;
7
8
public interface AbstractObjectChecker<
9
    V extends Checker<V, T, R>,
10
    T,
11
    R> extends
12
    Checker<V, T, R> {
13
  default V notNull() {
14 1 1. notNull : replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::notNull → KILLED
    return this.checkWithPredicate(Predicates.isNotNull());
15
  }
16
17
  default V nullValue() {
18 1 1. nullValue : replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::nullValue → KILLED
    return this.checkWithPredicate(Predicates.isNull());
19
  }
20
21
  /**
22
   * Checks the object with an argument if they are "equal", using `equalTo` method.
23
   *
24
   * @return the updated object.
25
   */
26
  default V equalTo(Object anotherObject) {
27 1 1. equalTo : replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::equalTo → KILLED
    return this.checkWithPredicate(Predicates.isEqualTo(anotherObject));
28
  }
29
30
  default V sameReferenceAs(Object anotherObject) {
31 1 1. sameReferenceAs : replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::sameReferenceAs → KILLED
    return this.checkWithPredicate(Predicates.isSameReferenceAs(anotherObject));
32
  }
33
34
  default V instanceOf(Class<?> klass) {
35 1 1. instanceOf : replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::instanceOf → KILLED
    return this.checkWithPredicate(Predicates.isInstanceOf(klass));
36
  }
37
38
  default V invoke(String methodName, Object... args) {
39 1 1. invoke : replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::invoke → KILLED
    return this.checkWithPredicate(Predicates.callp(MethodQuery.instanceMethod(parameter(), methodName, args)));
40
  }
41
42
  default V invokeStatic(Class<?> klass, String methodName, Object... args) {
43 1 1. invokeStatic : replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::invokeStatic → KILLED
    return this.checkWithPredicate(Predicates.callp(MethodQuery.classMethod(klass, methodName, args)));
44
  }
45
}

Mutations

14

1.1
Location : notNull
Killed by : com.github.dakusui.ut.valid8j.ut.styles.FluentStyleDbCTest$ForEnsuresTest.test_postcondition(com.github.dakusui.ut.valid8j.ut.styles.FluentStyleDbCTest$ForEnsuresTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::notNull → KILLED

18

1.1
Location : nullValue
Killed by : com.github.dakusui.ut.valid8j.ut.styles.fluent.GeneralFluentTest.exerciseTestCase[28: Given:<"456">:When::Then:greaterThan(1), numbersOfExpectAndActualSummaries=>areEqual, numbersOfExpectAndActualSummariesWithDetails=>areEqual, numberOfExpectDetails=>greaterThan(1), numbersOfExpectAndActualDetails=>areEqual]>](com.github.dakusui.ut.valid8j.ut.styles.fluent.GeneralFluentTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::nullValue → KILLED

27

1.1
Location : equalTo
Killed by : com.github.dakusui.ut.thincrest.ut.styles.FluentStyleTestAssertionTest$ForTestAssertionsTest.boolean_assertThatTest_passed(com.github.dakusui.ut.thincrest.ut.styles.FluentStyleTestAssertionTest$ForTestAssertionsTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::equalTo → KILLED

31

1.1
Location : sameReferenceAs
Killed by : com.github.dakusui.ut.valid8j.ut.styles.fluent.GeneralFluentTest.exerciseTestCase[28: Given:<"456">:When::Then:greaterThan(1), numbersOfExpectAndActualSummaries=>areEqual, numbersOfExpectAndActualSummariesWithDetails=>areEqual, numberOfExpectDetails=>greaterThan(1), numbersOfExpectAndActualDetails=>areEqual]>](com.github.dakusui.ut.valid8j.ut.styles.fluent.GeneralFluentTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::sameReferenceAs → KILLED

35

1.1
Location : instanceOf
Killed by : com.github.dakusui.ut.valid8j.ut.styles.fluent.GeneralFluentTest.exerciseTestCase[28: Given:<"456">:When::Then:greaterThan(1), numbersOfExpectAndActualSummaries=>areEqual, numbersOfExpectAndActualSummariesWithDetails=>areEqual, numberOfExpectDetails=>greaterThan(1), numbersOfExpectAndActualDetails=>areEqual]>](com.github.dakusui.ut.valid8j.ut.styles.fluent.GeneralFluentTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::instanceOf → KILLED

39

1.1
Location : invoke
Killed by : com.github.dakusui.ut.valid8j.ut.styles.fluent.GeneralFluentTest.exerciseTestCase[28: Given:<"456">:When::Then:greaterThan(1), numbersOfExpectAndActualSummaries=>areEqual, numbersOfExpectAndActualSummariesWithDetails=>areEqual, numberOfExpectDetails=>greaterThan(1), numbersOfExpectAndActualDetails=>areEqual]>](com.github.dakusui.ut.valid8j.ut.styles.fluent.GeneralFluentTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::invoke → KILLED

43

1.1
Location : invokeStatic
Killed by : com.github.dakusui.ut.valid8j.ut.styles.fluent.GeneralFluentTest.exerciseTestCase[28: Given:<"456">:When::Then:greaterThan(1), numbersOfExpectAndActualSummaries=>areEqual, numbersOfExpectAndActualSummariesWithDetails=>areEqual, numberOfExpectDetails=>greaterThan(1), numbersOfExpectAndActualDetails=>areEqual]>](com.github.dakusui.ut.valid8j.ut.styles.fluent.GeneralFluentTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/AbstractObjectChecker::invokeStatic → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.3