def test_journey_leg_without_in_out_connection():
    footpath = Footpath("s6", "s7", 1)
    journey_leg = JourneyLeg(None, None, footpath)
    assert journey_leg.in_connection is None
    assert journey_leg.out_connection is None
    assert footpath == journey_leg.footpath
    assert journey_leg.get_in_stop_id() is None
    assert journey_leg.get_out_stop_id() is None
    assert journey_leg.get_dep_time_in_stop_id() is None
    assert journey_leg.get_arr_time_out_stop_id() is None
def test_journey_leg_without_footpath():
    in_connection = Connection("t1", "s1", "s2", 10, 20)
    out_connection = Connection("t1", "s5", "s6", 30, 40)
    journey_leg = JourneyLeg(in_connection, out_connection, None)
    assert in_connection == journey_leg.in_connection
    assert out_connection == journey_leg.out_connection
    assert journey_leg.footpath is None
    assert "t1" == journey_leg.get_trip_id()
    assert "s1" == journey_leg.get_in_stop_id()
    assert "s6" == journey_leg.get_out_stop_id()
    assert 10 == journey_leg.get_dep_time_in_stop_id()
    assert 40 == journey_leg.get_arr_time_out_stop_id()
def test_journey_leg():
    in_connection = Connection("t1", "s1", "s2", 10, 20)
    out_connection = Connection("t1", "s5", "s6", 30, 40)
    footpath = Footpath("s6", "s7", 1)
    journey_leg = JourneyLeg(in_connection, out_connection, footpath)
    assert in_connection == journey_leg.in_connection
    assert out_connection == journey_leg.out_connection
    assert footpath == journey_leg.footpath
    assert "t1" == journey_leg.get_trip_id()
    assert "s1" == journey_leg.get_in_stop_id()
    assert "s6" == journey_leg.get_out_stop_id()
    assert "s1" == journey_leg.get_first_stop_id()
    assert "s7" == journey_leg.get_last_stop_id()
    assert 10 == journey_leg.get_dep_time_in_stop_id()
    assert 40 == journey_leg.get_arr_time_out_stop_id()