예제 #1
0
    def test_simulation_state(self):

        book_circle = BookCircle()
        book_circle.create_simulation(users_count=2, max_books_per_user=3, exchange_points_count=5)
        self.assertEqual(type(book_circle.simulation.state), type(SimulationState.ReadyToRunState()))

        book_circle.run_simulation()
        self.assertEqual(type(book_circle.simulation.state), type(SimulationState.ExecutedSimulationState()))
예제 #2
0
    def test_simulation_state(self):

        book_circle = BookCircle()
        book_circle.create_simulation(users_count=2,
                                      max_books_per_user=3,
                                      exchange_points_count=5)
        self.assertEqual(type(book_circle.simulation.state),
                         type(SimulationState.ReadyToRunState()))

        book_circle.run_simulation()
        self.assertEqual(type(book_circle.simulation.state),
                         type(SimulationState.ExecutedSimulationState()))
예제 #3
0
from BookCircleFacade import BookCircle

book_circle = BookCircle()
book_circle.create_simulation(users_count=2, max_books_per_user=3, exchange_points_count=5)
book_circle.run_simulation()
book_circle.save_simulation_data(commit=False)