BatchGuy.App.Eac3To.Services.EncodeTemplate1EAC3ToOutputNamingService.GetChapterName C# (CSharp) Method

GetChapterName() public method

public GetChapterName ( EAC3ToConfiguration eac3toConfiguration, string filesOutputPath, string paddedEpisodeNumber, string episodeName ) : string
eac3toConfiguration BatchGuy.App.Eac3to.Models.EAC3ToConfiguration
filesOutputPath string
paddedEpisodeNumber string
episodeName string
return string
        public override string GetChapterName(EAC3ToConfiguration eac3toConfiguration, string filesOutputPath, string paddedEpisodeNumber, string episodeName)
        {
            StringBuilder sb = new StringBuilder();
            if (eac3toConfiguration.IsExtractForRemux != true)
            {
                sb.Append(string.Format("\"{0}\\chapters{1}.txt\"", filesOutputPath, paddedEpisodeNumber));
            }
            return sb.ToString();
        }

Usage Example

 public void encodeTemplate1EAC3ToOutputNamingService_can_set_chapter_name_when_not_extract_for_remux_test()
 {
     //given not extract for remux
     EAC3ToConfiguration config = new EAC3ToConfiguration() { IsExtractForRemux = false };
     string filesOutputPath = "c:\\bluray";
     string paddedEpisodeNumber = "01";
     string episodeName = string.Empty;
     //when i get the chapter name
     IAudioService audioService = new AudioService();
     AbstractEAC3ToOutputNamingService service = new EncodeTemplate1EAC3ToOutputNamingService(audioService);
     string chapterName = service.GetChapterName(config, filesOutputPath, paddedEpisodeNumber, episodeName);
     //then chapter name should be hard coded for workflow
     chapterName.Should().Be("\"c:\\bluray\\chapters01.txt\"");
 }