Exemplo n.º 1
0
        public void PresenterTest_VesselDataMatchesSimulation()
        {
            // First start the simulation through presenter.
            bool isStarted = vesselPresenter.Start("test_oneofeach.vsf");

            Assert.IsTrue(isStarted, "Could not start simulation.");

            // Stop it immediately because we don't need the timer updates.
            Cker.Simulator.Stop();

            // Now, the presenter vessel list should match up the simulator vessel list.
            Assert.AreEqual(vesselPresenter.DisplayedVessels.Count, Cker.Simulator.Vessels.Count, "Vessel lists are different sizes.");
            Assert.AreEqual(vesselPresenter.DisplayedVessels.Intersect(Cker.Simulator.Vessels).Count(), Cker.Simulator.Vessels.Count, "Vessel lists have different elements.");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Must specify the scenario file to start
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        public bool Start(string file)
        {
            bool isSuccessful = vesselPresenter.Start(file);

            return(isSuccessful);
        }