public void FileNameContains_TodaysDate_WhenFileCreated_Today() { string name = "MyFile01"; var testSetup = Tests.TestingHelpers.SmoothFileHelper.GenerateTestFile(name); var strategy = new CreateDateAndCustomTextStrategy("name", testSetup.TestFile); var result = strategy.GenerateName(); Assert.True(result.Contains(System.DateTime.Now.ToString("MMddyyyy"))); }
public void FileNameContains_FileName_WhenFileCreated_Today() { string name = new ImageHelper().GetRandomImageFileName(); string customText = "SmoothUpload1"; var testSetup = Tests.TestingHelpers.SmoothFileHelper.GenerateTestFile(name); var strategy = new CreateDateAndCustomTextStrategy(customText, testSetup.TestFile); var result = strategy.GenerateName(); Assert.True(result.Contains(name)); }