public void ActivateonlyCameraWillDisableCamerasThatAreNotParameter()
        {
            Camera cam1           = ComponentCreator.Create <Camera>();
            Camera cam2           = ComponentCreator.Create <Camera>();
            Camera cam3           = ComponentCreator.Create <Camera>();
            Camera attachedCamera = ComponentCreator.Create <Camera>();

            ICameraController stubController = Substitute.For <ICameraController>();

            stubController.FetchCameras().Returns(new[] { cam1, cam2, attachedCamera, cam3 });
            stubController.FetchAttachedCamera().Returns(attachedCamera);

            MainCameraSwitcherLogic logic = new MainCameraSwitcherLogic();

            logic.SetCameraController(stubController);

            cam1.enabled           = true;
            cam2.enabled           = true;
            cam3.enabled           = true;
            attachedCamera.enabled = true;


            Assert.IsTrue(cam1.enabled);
            Assert.IsTrue(cam2.enabled);
            Assert.IsTrue(cam3.enabled);
            Assert.IsTrue(attachedCamera.enabled);

            logic.ActivateOnlyCamera(attachedCamera);


            Assert.IsFalse(cam1.enabled);
            Assert.IsFalse(cam2.enabled);
            Assert.IsFalse(cam3.enabled);
            Assert.IsTrue(attachedCamera.enabled);
        }
        public void ActivateOnlyCameraActivatesAttachedCameraCorrectly()
        {
            Camera cam = ComponentCreator.Create <Camera>();

            cam.enabled = false;

            ICameraController stubController = Substitute.For <ICameraController>();

            stubController.FetchCameras().Returns(new[] { cam });
            stubController.FetchAttachedCamera().Returns(cam);

            MainCameraSwitcherLogic logic = new MainCameraSwitcherLogic();

            logic.SetCameraController(stubController);
            logic.ActivateOnlyCamera(cam);

            stubController.Received(1).FetchCameras();
            Assert.IsTrue(cam.enabled);
        }