public void Should_be_possible_to_create_itemTypes_by_combination_of_entities_with_filePath() { var filePath = new List <string>() { @"c:\projetos\demandas\resources\file.txt", @"c:\projetos\integration\resources\file.txt" }; var itemTypes = new FileItemTypeFactory(FamilyEnumeration.windows) .CreateFileItemTypesByCombinationOfEntitiesFrom(filePath, new List <string>(), new List <string>()); Assert.AreEqual(2, itemTypes.Count()); Assert.AreEqual(@"c:\projetos\demandas\resources\file.txt", ((file_item)itemTypes.ElementAt(0)).filepath.Value); Assert.AreEqual(@"c:\projetos\integration\resources\file.txt", ((file_item)itemTypes.ElementAt(1)).filepath.Value); }
public void Should_be_possible_to_create_itemTypes_by_combination_of_entities_without_filepath() { IEnumerable <string> paths = new List <string>() { @"c:\projetos\demandas\resources", @"c:\projetos\integration\resources" }; IEnumerable <string> fileName = new List <string>() { "file.txt" }; FileItemTypeFactory factory = new FileItemTypeFactory(FamilyEnumeration.windows); IEnumerable <ItemType> itemTypes = factory.CreateFileItemTypesByCombinationOfEntitiesFrom(new List <string>(), paths, fileName); Assert.AreEqual(2, itemTypes.Count()); Assert.AreEqual(@"c:\projetos\demandas\resources", ((file_item)itemTypes.ElementAt(0)).path.Value); Assert.AreEqual(@"c:\projetos\integration\resources", ((file_item)itemTypes.ElementAt(1)).path.Value); }