Example #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);
        }
Example #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
                                         ));
        }
Example #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)
                                         ));
        }
Example #4
0
 public Task <List <Event> > ParseEventWithPipes()
 {
     return(UTF8Parser.LoadAndParseFeed(file));
 }