Ejemplo n.º 1
0
 public static Person CreatePerson(string parentFolderPath, string name)
 {
     return(new Person(parentFolderPath, name, null, new PersonFileType(() => null, () => null),
                       MakeComponent, new XmlFileSerializer(null), (w, x, y, z) =>
                       new ProjectElementComponentFile(w, x, y, z, FieldUpdater.CreateMinimalFieldUpdaterForTests(null)),
                       new ComponentRole[] {}));
 }
Ejemplo n.º 2
0
        public void Setup()
        {
            _rootFolder = new TemporaryFolder("~FamousPainters~");
            var italiansFolder = _rootFolder.Combine("~Italians~");

            Directory.CreateDirectory(italiansFolder);

            var imgFileType   = new ImageFileType(() => null, null);
            var audioFileType = new AudioFileType(null, () => null, () => null);

            var path = _rootFolder.Combine("PierreAugusteRenoir.jpg");

            _imgFile1 = SetupData(path, imgFileType, "Claude", "Monet", "1840", "1840");

            path      = Path.Combine(italiansFolder, "SistineChapel.jpg");
            _imgFile2 = SetupData(path, imgFileType, "Michelangelo", "di Lodovico Buonarroti Simoni", "1475", "1564");

            path        = _rootFolder.Combine("OntheTerrace.mp3");
            _audioFile1 = SetupData(path, audioFileType, "Pierre-Auguste", "Renoir", "1841", "1919");

            path        = Path.Combine(italiansFolder, "TheLastSupper.mp3");
            _audioFile2 = SetupData(path, audioFileType, "Leonardo", "da Vinci", "1452", "1519");

            _updater = FieldUpdater.CreateMinimalFieldUpdaterForTests(_rootFolder.Path);
        }
Ejemplo n.º 3
0
 public static Session CreateSession(string parentFolderPath, string name)
 {
     return(new Session(parentFolderPath, name, null, new SessionFileType(() => null, () => null, () => null),
                        MakeComponent, new XmlFileSerializer(null), (w, x, y, z) =>
                        new ProjectElementComponentFile(w, x, y, z, FieldUpdater.CreateMinimalFieldUpdaterForTests(null)),
                        ApplicationContainer.ComponentRoles, null, null));
 }
Ejemplo n.º 4
0
 private Session CreateSession()
 {
     return(new Session(_parentFolder.Path, "xyz", null, new SessionFileType(() => null, () => null, () => null),
                        (parentElement, path) => null, new XmlFileSerializer(null), (w, x, y, z) =>
     {
         return new ProjectElementComponentFile(w, x, y, z,
                                                FieldUpdater.CreateMinimalFieldUpdaterForTests(null));
     }, null, null, null));
 }
Ejemplo n.º 5
0
 public DummySession(string parentFolder, string name, PersonInformant personInformant, params string[] actors) : base(parentFolder, name + "-session", null, new SessionFileType(() => null, () => null, () => null),
                                                                                                                       MakeComponent, new XmlFileSerializer(null), (w, x, y, z) =>
                                                                                                                       new ProjectElementComponentFile(w, x, y, z, FieldUpdater.CreateMinimalFieldUpdaterForTests(null)),
                                                                                                                       ApplicationContainer.ComponentRoles, personInformant, null)
 {
     if (actors == null || actors.Length == 0)
     {
         Participants = new[] { "ddo-person" }
     }
     ;
     else
     {
         Participants = actors;
     }
     MetaFile.Setup(m => m.GetStringValue(SessionFileType.kTitleFieldName, It.IsAny <string>())).Returns(name);
     MetaFile.Setup(m => m.GetCustomFields()).Returns(new List <FieldInstance>());
 }