예제 #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
 public GivenData(ISlugFactory slugFactory)
 {
     _slugFactory = slugFactory;
     Git          = new GitData();
 }
예제 #4
0
        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);
        }