# Path: android_env/components/simulators/fake/fake_simulator.py
# class FakeStream():
# class FakeLogStream(log_stream.LogStream):
# class FakeAdbController(adb_controller.AdbController):
# class FakeSimulator(base_simulator.BaseSimulator):
#   def __init__(self):
#   def _make_stdout(self, data):
#   def kill(self):
#   def __iter__(self):
#   def __init__(self):
#   def _get_stream_output(self):
#   def stop_stream(self):
#   def __init__(self,
#                screen_dimensions: Tuple[int, int],
#                fake_activity: str,
#                *args, **kwargs):
#   def _execute_command(
#       self,
#       args: List[str],
#       timeout: Optional[float] = None) -> Optional[bytes]:
#   def _wait_for_device(
#       self,
#       max_tries: int = 20,
#       sleep_time: float = 1.0,
#       timeout: Optional[float] = None) -> None:
#   def get_screen_dimensions(
#       self, timeout: Optional[float] = None) -> Tuple[int, int]:
#   def get_current_activity(
#       self, timeout: Optional[float] = None) -> Optional[str]:
#   def is_package_installed(
#       self, package_name: str, timeout: Optional[float] = None) -> bool:
#   def start_screen_pinning(
#       self, full_activity: str, timeout: Optional[float] = None):
#   def __init__(self,
#                screen_dimensions: Tuple[int, int] = (480, 320),
#                fake_activity: str = '',
#                **kwargs):
#   def adb_device_name(self) -> str:
#   def create_adb_controller(self):
#   def _restart_impl(self) -> None:
#   def _launch_impl(self) -> None:
#   def send_action(self, action: Dict[str, np.ndarray]) -> None:
#   def _get_observation(self) -> Optional[List[np.ndarray]]:
#   def _create_log_stream(self) -> log_stream.LogStream:


from absl.testing import absltest
from android_env.components.simulators.fake import fake_simulator
import numpy as np
# coding=utf-8
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Tests for fake_simulator."""



class FakeSimulatorTest(absltest.TestCase):

  def test_device_name(self):
    simulator = fake_simulator.FakeSimulator(screen_dimensions=(320, 480))
    self.assertEqual(simulator.adb_device_name(), 'fake_simulator')

  def test_launch_close(self):
    # The simulator should launch and not crash.

# Path: android_env/components/simulators/fake/fake_simulator.py
# class FakeStream():
# class FakeLogStream(log_stream.LogStream):
# class FakeAdbController(adb_controller.AdbController):
# class FakeSimulator(base_simulator.BaseSimulator):
#   def __init__(self):
#   def _make_stdout(self, data):
#   def kill(self):
#   def __iter__(self):
#   def __init__(self):
#   def _get_stream_output(self):
#   def stop_stream(self):
#   def __init__(self,
#                screen_dimensions: Tuple[int, int],
#                fake_activity: str,
#                *args, **kwargs):
#   def _execute_command(
#       self,
#       args: List[str],
#       timeout: Optional[float] = None) -> Optional[bytes]:
#   def _wait_for_device(
#       self,
#       max_tries: int = 20,
#       sleep_time: float = 1.0,
#       timeout: Optional[float] = None) -> None:
#   def get_screen_dimensions(
#       self, timeout: Optional[float] = None) -> Tuple[int, int]:
#   def get_current_activity(
#       self, timeout: Optional[float] = None) -> Optional[str]:
#   def is_package_installed(
#       self, package_name: str, timeout: Optional[float] = None) -> bool:
#   def start_screen_pinning(
#       self, full_activity: str, timeout: Optional[float] = None):
#   def __init__(self,
#                screen_dimensions: Tuple[int, int] = (480, 320),
#                fake_activity: str = '',
#                **kwargs):
#   def adb_device_name(self) -> str:
#   def create_adb_controller(self):
#   def _restart_impl(self) -> None:
#   def _launch_impl(self) -> None:
#   def send_action(self, action: Dict[str, np.ndarray]) -> None:
#   def _get_observation(self) -> Optional[List[np.ndarray]]:
#   def _create_log_stream(self) -> log_stream.LogStream:


# Path: android_env/components/simulators/fake/fake_simulator_test.py
from absl.testing import absltest
from android_env.components.simulators.fake import fake_simulator
import numpy as np

# coding=utf-8
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Tests for fake_simulator."""



class FakeSimulatorTest(absltest.TestCase):

  def test_device_name(self):
    simulator = fake_simulator.FakeSimulator(screen_dimensions=(320, 480))
    self.assertEqual(simulator.adb_device_name(), 'fake_simulator')

  def test_launch_close(self):
    # The simulator should launch and not crash.

    simulator = fake_simulator.FakeSimulator(screen_dimensions=(320, 480))