コード例 #1
0
 public PublishAsyncSteps(GivenData given, ActualData actual, ScenarioHelpers scenarioHelpers, InvocationRecorder invocationRecorder, ISlugFactory slugFactory)
 {
     _given              = given;
     _actual             = actual;
     _blogPostRepository = scenarioHelpers.BlogPostRepository;
     _blogPostRepositoryWorkingDirectory = scenarioHelpers.BlogPostRepositoryWorkingDirectory;
     _invocationRecorder = invocationRecorder;
     _slugFactory        = slugFactory;
 }
コード例 #2
0
 public GivenData(ISlugFactory slugFactory)
 {
     _slugFactory = slugFactory;
 }
コード例 #3
0
ファイル: GivenData.cs プロジェクト: TimMurphy/Casper
 public GivenData(ISlugFactory slugFactory)
 {
     _slugFactory = slugFactory;
     Git          = new GitData();
 }
コード例 #4
0
ファイル: StringExtensions.cs プロジェクト: TimMurphy/Casper
        public static string ToUrlFriendlyFileNameWithExtension(this string fileNameWithExtension, ISlugFactory slugFactory)
        {
            var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileNameWithExtension);
            var extension   = Path.GetExtension(fileNameWithExtension);
            var urlFriendly = slugFactory.CreateSlug(fileNameWithoutExtension) + extension;

            return(urlFriendly);
        }