public void SingleWSMode_DeleteThrows()
 {
     _model = new WritingSystemSetupModel(new WritingSystemDefinition());
     Assert.Throws <InvalidOperationException>(
         () => _model.DeleteCurrent()
         );
 }
		public void SingleWSMode_DeleteThrows()
		{
			_model = new WritingSystemSetupModel(new WritingSystemDefinition());
			Assert.Throws<InvalidOperationException>(
				() => _model.DeleteCurrent()
			);
		}
 public void DeleteCurrent_NoLongerInList()
 {
     using (new DeleteCurrentTestEnvironment())
     {
         _model.AddNew();
         _model.CurrentIso = "pt";
         _model.AddNew();
         _model.CurrentIso = "de";
         _model.AddNew();
         _model.CurrentIso = "th";
         var writingSystems = new List <string>();
         for (_model.CurrentIndex = _model.WritingSystemCount - 1;
              _model.HasCurrentSelection;
              _model.CurrentIndex--)
         {
             writingSystems.Insert(0, _model.CurrentIso);
         }
         string deletedWritingSystem = writingSystems[1];
         _model.CurrentIndex = 1;
         _model.DeleteCurrent();
         for (_model.CurrentIndex = _model.WritingSystemCount - 1;
              _model.HasCurrentSelection;
              _model.CurrentIndex--)
         {
             Assert.AreNotEqual(deletedWritingSystem, _model.CurrentIso);
         }
     }
 }
 private void DeleteMenuClick(object sender, EventArgs e)
 {
     _model.DeleteCurrent();
 }