示例#1
0
        public void captures_provenance_on_writers()
        {
            var events = theLogs.EventsOfType <Created>().Where(x => x.Subject is WriterNode);

            events.Any().ShouldBeTrue();

            events.Each(x => {
                x.Source.ProvenanceChain.ShouldNotBeNull();
            });
        }
        private ServiceViewModel groupBy(Func <ServiceEvent, string> grouping, Action <ServiceEvent, Description> alteration, Func <ServiceEvent, string> ordering)
        {
            var events = _log.EventsOfType <ServiceEvent>();
            var tags   = events.GroupBy(grouping).Select(group =>
            {
                var descriptions = group.OrderBy(ordering).Select(@event =>
                {
                    var description = Description.For(@event);
                    alteration(@event, description);

                    return(description);
                });

                return(new ServiceGroupTag(group.Key, descriptions));
            });

            return(new ServiceViewModel(tags));
        }