def test_range_simulation(self):
        presim = PreSimRangeTest()
        presim.description = "PreSimulateKernel used in TestSimulation"
        sim = SimRangeTest()
        sim.description = "SimulateKernel used in TestSimulation"
        postsim = PostSimRangeTest()
        postsim.description = "PostSimulateKernel used in TestSimulation"

        self.simulation.kernels.append(presim)
        self.simulation.kernels.append(sim)
        self.simulation.kernels.append(postsim)

        self.simulation.steps = 20

        self.session.add(presim)
        self.session.add(sim)
        self.session.add(postsim)
        self.session.commit()

        print("-----RUNNING TEST SIMULATION-----")
        self.simulation.run()
        print("-----END TEST SIMULATION-----")

        self.session.commit()

        assert self.simulation.diagnostics["counter"].data == 14
    def test_range_kernel_presim(self):
        presim = PreSimRangeTest()
        self.simulation.kernels.append(presim)

        presim.execute(self.simulation.arguments,self.simulation.diagnostics)

        assert self.simulation.diagnostics["counter"].data == 0

        assert self.simulation.arguments["range"].validate(5)