Uses of Class
io.github.valentinherrmann.levenshtein.Mock
-
Uses of Mock in io.github.valentinherrmann.levenshtein
Methods in io.github.valentinherrmann.levenshtein that return MockModifier and TypeMethodDescriptionClassWrapper.mock()Starts aMockof the class: an object whose methods the test can replace and whose calls are recorded, created without running a constructor of the class.Mock.othersReturnDefaults()Makes this a full mock: methods without override return their default value (0,false,null) instead of running the student's code.Mock.override(MethodWrapper<?, ?> method, Function<Object[], Object> function) Replaces a method: every call of it runsfunctioninstead of the student's code.Mock.returning(MethodWrapper<?, ?> method, Object value) Replaces a method by one that always returnsvalue.