package org.opentrafficsim.sim0mq.publisher; import org.djunits.unit.TimeUnit; import org.djunits.value.vdouble.scalar.Time; import org.mockito.Mockito; import org.opentrafficsim.core.dsol.OTSSimulatorInterface; /** * MockSimulator.java.
*
* Copyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See * for project information www.simulation.tudelft.nl. The * source code and binary code of this software is proprietary information of Delft University of Technology. * @author Alexander Verbraeck */ public final class MockDEVSSimulator { /** */ private MockDEVSSimulator() { // Utility class } /** * @return mocked DEVSSimulator */ public static OTSSimulatorInterface createMock() { OTSSimulatorInterface mockSimulator = Mockito.mock(OTSSimulatorInterface.class); Mockito.when(mockSimulator.getSimulatorTime()).thenReturn(new Time(0.0, TimeUnit.DEFAULT)); return mockSimulator; } }