public NoteKeeperForm()
 {
     InitializeComponent();
     try
     {
         _noteKeeperOperator = new NoteKeeperOperator(new XMLStorageService());
         _noteKeeperOperator.OpenLastSavedNoteViaMetaData();
         UpdateNoteOnForms();
     }
     catch (UnauthorizedAccessException un)
     {
         Debug.WriteLine(un.Message);
         MessageBox.Show("Currently you are unauthorized to create a Directory in this space in order to store your Notes!");
         Application.Exit();
     }
     catch (IOException io)
     {
         Debug.WriteLine(io.Message);
         MessageBox.Show("The specified directory path is a file!");
         Application.Exit();
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
         MessageBox.Show("Oops, something went wrong! Please lookup in the non-existing Log-File!");
         Application.Exit();
     }
 }
        public void GivenJSONServiceAndNote_WhenSavingFileAndClosingApp_ThenTheSameNoteShouldBeLoadedViaMetaDataFileNextTimeAfterOpeningApp()
        {
            NoteKeeperOperator noteKeeperOperator = new NoteKeeperOperator(new JSONStorageService(), PATH);

            noteKeeperOperator.SaveWithDynamicFileName("Titel", "Foo");
            Note expectedNote = noteKeeperOperator.Note;

            noteKeeperOperator = new NoteKeeperOperator(new JSONStorageService(), PATH);
            noteKeeperOperator.OpenLastSavedNoteViaMetaData();
            Note actualNote = noteKeeperOperator.Note;

            Assert.Equal(expectedNote.Title, actualNote.Title);
            Assert.Equal(expectedNote.Text, actualNote.Text);
            Assert.Equal(expectedNote.Created.ToString(), actualNote.Created.ToString());
            Assert.Equal(expectedNote.LastEdited.ToString(), actualNote.LastEdited.ToString());
        }