public void IdentifyAsComponent(SessionComponentDefinition definition, string sessionId) { string newPath = definition.GetCanoncialName(sessionId, FullFilePath); try { File.Move(FullFilePath, newPath); FullFilePath = newPath; } catch (Exception e) { ErrorReport.ReportNonFatalException(e); } }
public void GetCanonicalName_HasDirectoryInPath_ChangesName() { SessionComponentDefinition def = GetDefinitionForOriginalRecording(); Assert.AreEqual(@"c:\foo\mySession_Original.wav", def.GetCanoncialName("mySession", @"c:\foo\fub.wav")); }