Back
Close

Computing with Data

elgeish
158.9K views

Test Hooks - Part I

For example, if we want to record the timestamp at which a reminder is inserted in the database, we need to control what value is sent to the database at the time of insertion. The below example shows an incomplete way of verifying the behavior:

import org.easymock.EasyMock;
import org.testng.annotations.Test;
interface DataLayer {
void insertReminder(
final Reminder reminder, long creationTimestampInMillis);
}
class Reminder {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants