public void SearchCommandTest()
        {
            var completion = new ManualResetEvent(false);

            //DeviceRepositoryViewModel_Accessor target = new DeviceRepositoryViewModel_Accessor();
            DeviceRepositoryViewModel target = new DeviceRepositoryViewModel();
            target.DriveManager = new MockDriveManager();
            target.SelectedVehicle = new Vehicle();
            target.LoadCommand.Execute((Action)(() => {
                completion.Set();
            }));

            completion.WaitOne();

            DateTime d1 = new DateTime(2012, 3, 11, 20, 37, 11).StripSeconds();
            DateTime d2 = new DateTime(2012, 3, 11, 20, 38, 13).StripSeconds();

            int count = 0;
            foreach (Track t in target.Tracks) {
                if (t.CreateDate.StripSeconds() >= d1 &&
                    t.CreateDate.StripSeconds() <= d2) {
                    count++;
                }
            }

            target.SearchFrom = d1;
            target.SearchTo = d2;
            target.SearchCommand.Execute(null);

            int expected = count;
            int actual = target.Tracks.Count;
            Assert.AreEqual(actual, expected);
        }
        public void LoadCommandTest()
        {
            var completion = new ManualResetEvent(false);

            //DeviceRepositoryViewModel_Accessor target = new DeviceRepositoryViewModel_Accessor(); // TODO: Initialize to an appropriate value
            DeviceRepositoryViewModel target = new DeviceRepositoryViewModel();
            target.DriveManager = new MockDriveManager();
            target.SelectedVehicle = new Vehicle();
            target.LoadCommand.Execute((Action)(() => {
                completion.Set();
            }));

            completion.WaitOne();
            Assert.IsNotNull(target.Tracks);
        }