Beispiel #1
0
        public async Task CanParseEvents()
        {
            var file = new FileInfo(Path.Combine(AppContext.BaseDirectory, "Data", "basic.ics"));

            var events = await UTF8Parser.LoadAndParseFeed(file);

            Assert.Equal(1159, events.Count);
        }
Beispiel #2
0
        public async Task CanParseInstants()
        {
            var file = new FileInfo(Path.Combine(AppContext.BaseDirectory, "Data", "basic.ics"));

            var events = await UTF8Parser.LoadAndParseFeed(file);

            Assert.NotEmpty(events.Where(ev =>
                                         ev.Start != default
                                         ||
                                         ev.End != default
                                         ));
        }
Beispiel #3
0
        public async Task CanParseTextProperties()
        {
            var file = new FileInfo(Path.Combine(AppContext.BaseDirectory, "Data", "basic.ics"));

            var events = await UTF8Parser.LoadAndParseFeed(file);

            Assert.NotEmpty(events.Where(ev =>
                                         !string.IsNullOrWhiteSpace(ev.UId)
                                         ||
                                         !string.IsNullOrWhiteSpace(ev.Summary)
                                         ));
        }
Beispiel #4
0
 public Task <List <Event> > ParseEventWithPipes()
 {
     return(UTF8Parser.LoadAndParseFeed(file));
 }