Beispiel #1
0
        void OpenDumpFile_FileOk(object sender, System.ComponentModel.CancelEventArgs e)
        {
            DumpFileHandler handler = new DumpFileHandler(OpenDumpFile.FileName);
            xrfSample       sample  = handler.GetSampleData();

            Samples.Add(new SampleWorkspaceViewModel(OpenDumpFile.SafeFileName, ref sample));
            SelectedSample = Samples[Samples.Count - 1] as SampleWorkspaceViewModel;
        }
        public void GetSampleData_PathNullOrEmpty_InvalidArgumentException()
        {
            DumpFileHandler handler;

            handler = new DumpFileHandler("");
            handler.GetSampleData();
            handler = new DumpFileHandler(null);
            handler.GetSampleData();
        }
        public void GetSampleData_PathInvalid_InvalidArgumentException()
        {
            DumpFileHandler handler = new DumpFileHandler(dummyPath);

            handler.GetSampleData();
        }
        public void GetSampleData_PathIsWhiteSpace_InvalidArgumentException()
        {
            DumpFileHandler handler = new DumpFileHandler("  ");

            handler.GetSampleData();
        }