BooleanTransformer.java

1
package com.github.valid8j.pcond.core.fluent.builtins;
2
3
4
import com.github.valid8j.pcond.core.fluent.AbstractObjectTransformer;
5
import com.github.valid8j.pcond.internals.InternalUtils;
6
7
import java.util.function.Function;
8
import java.util.function.Supplier;
9
10
import static java.util.Objects.requireNonNull;
11
12
public interface BooleanTransformer<T> extends
13
    AbstractObjectTransformer<
14
            BooleanTransformer<T>,
15
        BooleanChecker<T>,
16
            T,
17
            Boolean
18
            > {
19
  static BooleanTransformer<Boolean> create(Supplier<Boolean> value) {
20 1 1. create : replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/BooleanTransformer::create → KILLED
    return new Impl<>(value, InternalUtils.trivialIdentityFunction());
21
  }
22
23
  class Impl<T> extends
24
      Base<
25
          BooleanTransformer<T>,
26
          BooleanChecker<T>,
27
          T,
28
          Boolean
29
          > implements
30
      BooleanTransformer<T> {
31
    public Impl(Supplier<T> value, Function<T, Boolean> transfomFunction) {
32
      super(value, transfomFunction);
33
    }
34
35
    @Override
36
    protected BooleanChecker<T> toChecker(Function<T, Boolean> transformFunction) {
37 1 1. toChecker : replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/BooleanTransformer$Impl::toChecker → KILLED
      return new BooleanChecker.Impl<>(this::baseValue, requireNonNull(transformFunction));
38
    }
39
40
    @Override
41
    protected BooleanTransformer<Boolean> rebase() {
42 1 1. rebase : replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/BooleanTransformer$Impl::rebase → KILLED
      return new Impl<>(this::value, InternalUtils.trivialIdentityFunction());
43
    }
44
  }
45
}

Mutations

20

1.1
Location : create
Killed by : com.github.valid8j.entrypoints.ExpectationsTest.testPassingThat[121: REQUIRE_ARGUMENT: BOOLEAN_STATEMENT](com.github.valid8j.entrypoints.ExpectationsTest)
replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/BooleanTransformer::create → KILLED

37

1.1
Location : toChecker
Killed by : com.github.valid8j.entrypoints.ExpectationsTest.testPassingThat[121: REQUIRE_ARGUMENT: BOOLEAN_STATEMENT](com.github.valid8j.entrypoints.ExpectationsTest)
replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/BooleanTransformer$Impl::toChecker → KILLED

42

1.1
Location : rebase
Killed by : com.github.valid8j.ut.styles.fluent.FluentBooleanTest.givenFalse_whenTransformIsTrue_thenComparisonFailure(com.github.valid8j.ut.styles.fluent.FluentBooleanTest)
replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/BooleanTransformer$Impl::rebase → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.3