Ejemplo n.º 1
0
        public static SampleRecordRepository Create()
        {
            IList <SampleRecord> records = new List <SampleRecord>()
            {
                new SampleRecord()
                {
                    Id           = 11,
                    Date         = new DateTime(2018, 2, 16, 1, 0, 0, DateTimeKind.Utc),
                    Title        = "Title 1",
                    Owner        = "Owner 1",
                    Contributors = new List <string>()
                    {
                        "Contributor 1", "Contributor 1.1"
                    }
                },
                new SampleRecord()
                {
                    Id    = 13,
                    Date  = new DateTime(2018, 2, 16, 3, 0, 0, DateTimeKind.Utc),
                    Title = "Title 3"
                },
                new SampleRecord()
                {
                    Id    = 12,
                    Date  = new DateTime(2018, 2, 16, 2, 0, 0, DateTimeKind.Utc),
                    Title = "Title 2",
                    Owner = "Owner 2"
                },
                new SampleRecord()
                {
                    Id    = 14,
                    Date  = new DateTime(2018, 2, 16, 4, 0, 0, DateTimeKind.Utc),
                    Title = "Title 4",
                    Owner = "Owner 4"
                },
                new SampleRecord()
                {
                    Id           = 15,
                    Date         = new DateTime(2018, 2, 16, 5, 0, 0, DateTimeKind.Utc),
                    Title        = "Title 5",
                    Owner        = "Owner 5",
                    Contributors = new List <string>()
                    {
                        "Contributor 5"
                    }
                }
            };

            IOaiConfiguration           configuration = OaiConfiguration.Instance;
            DateConverter               dateConverter = new DateConverter();
            DublinCoreMetadataConverter dublinCoreMetadataConverter = new DublinCoreMetadataConverter(configuration, dateConverter);

            return(new SampleRecordRepository(configuration, records, dateConverter, dublinCoreMetadataConverter));
        }
 public void Init()
 {
     OaiConfigurationTest.Init();
     _converter = new DublinCoreMetadataConverter(OaiConfiguration.Instance, new DateConverter());
 }