public TricycleConfig Clone() { return(new TricycleConfig() { Version = Version, Video = Video?.Clone(), Audio = Audio?.Clone(), ForcedSubtitlesOnly = ForcedSubtitlesOnly, PreferSoftSubtitles = PreferSoftSubtitles, DefaultFileExtensions = DefaultFileExtensions?.ToDictionary(p => p.Key, p => p.Value), CompletionAlert = CompletionAlert, DeleteIncompleteFiles = DeleteIncompleteFiles, DestinationDirectoryMode = DestinationDirectoryMode, DestinationDirectory = DestinationDirectory, Trace = Trace }); }
public void CheckIfOnlyOccursOnes() { bool foundError = false; var fileExtensions = DefaultFileExtensions.GetDefault(); foreach (var fileExtension in fileExtensions) { foreach (var item in fileExtensions) { if (fileExtension.Extension == item.Extension && item != fileExtension) { foundError = true; Console.WriteLine($"{item.Extension} occures at least twice"); } } } Assert.IsFalse(foundError); }