public void MediaSetList_ShouldReturnEmptyListIfNoIconFilesArePresentAndNoPicFilesArePresent() { //Arrange const string itemNumber = "0101-15001"; const JewelMediaType jewelMediaSets = JewelMediaType.All; var fakeFileSystem = FakeFileSystem.MediaFileSystemForItemNumber(new Dictionary <string, MockFileData>() { { String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-pic-wg.jpg", itemNumber), new MockFileData("") }, // {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-icon-wg.jpg",itemNumber),new MockFileData("")}, { String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-hand-wg.jpg", itemNumber), new MockFileData("") }, { String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-hires-wg.jpg", itemNumber), new MockFileData("") }, { String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-mov-wg.flv", itemNumber), new MockFileData("") }, // {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-pic-yg.jpg",itemNumber),new MockFileData("")}, { String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-icon-yg.jpg", itemNumber), new MockFileData("") }, { String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-hand-yg.jpg", itemNumber), new MockFileData("") }, { String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-hires-yg.jpg", itemNumber), new MockFileData("") }, { String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-mov-yg.flv", itemNumber), new MockFileData("") } }); var settingManager = new FakeSettingManager(); var mediaSetBuilder = new MediaSetBuilder(settingManager, fakeFileSystem); //Act var mediaSetList = mediaSetBuilder.Build(itemNumber, jewelMediaSets); //Assert mediaSetList.Should().HaveCount(0); }
public void MediaSetList_ShouldReturn1SetBecauseIconDoesntExistOnOneOfTheSets() { //Arrange const string itemNumber = "0101-15001"; const JewelMediaType jewelMediaSets = JewelMediaType.All; var fakeFileSystem = FakeFileSystem.MediaFileSystemForItemNumber(new Dictionary<string, MockFileData>() { {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-pic-wg.jpg",itemNumber),new MockFileData("")}, // {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-icon-wg.jpg",itemNumber),new MockFileData("")}, {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-hand-wg.jpg",itemNumber),new MockFileData("")}, {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-hires-wg.jpg",itemNumber),new MockFileData("")}, {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-mov-wg.flv",itemNumber),new MockFileData("")}, {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-pic-yg.jpg",itemNumber),new MockFileData("")}, {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-icon-yg.jpg",itemNumber),new MockFileData("")}, {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-hand-yg.jpg",itemNumber),new MockFileData("")}, {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-hires-yg.jpg",itemNumber),new MockFileData("")}, {String.Format(@"C:\Users\maMLUka\Documents\jewelryonnet\internet-sites\jon-images\jewelry\{0}-mov-yg.flv",itemNumber),new MockFileData("")} }); var settingManager = new FakeSettingManager(); var mediaSetBuilder = new MediaSetBuilder( settingManager, fakeFileSystem); //Act var mediaSetList = mediaSetBuilder.Build(itemNumber, jewelMediaSets); //Assert mediaSetList.Should().HaveCount(1); }
public void MediaSetList_ShouldReturn2SetsBecauseTheFileExist() { //Arrange const string itemNumber = "0101-15001"; const JewelMediaType jewelMediaSets = JewelMediaType.All; var fakeFileSystem = FakeFileSystem.MediaFileSystemForItemNumber(); var settingManager = new FakeSettingManager(); var mediaSetBuilder = new MediaSetBuilder(settingManager, fakeFileSystem); //Act var mediaSetList = mediaSetBuilder.Build(itemNumber,jewelMediaSets); //Assert mediaSetList.Should().HaveCount(2); }
public void MediaSetList_ShouldReturn2SetsBecauseTheFileExist() { //Arrange const string itemNumber = "0101-15001"; const JewelMediaType jewelMediaSets = JewelMediaType.All; var fakeFileSystem = FakeFileSystem.MediaFileSystemForItemNumber(); var settingManager = new FakeSettingManager(); var mediaSetBuilder = new MediaSetBuilder(settingManager, fakeFileSystem); //Act var mediaSetList = mediaSetBuilder.Build(itemNumber, jewelMediaSets); //Assert mediaSetList.Should().HaveCount(2); }