Example #1
0
        public void OnEnd_passes_through_to_inner_collectors()
        {
            EventCollectorStub      stub1     = new EventCollectorStub();
            EventCollectorStub      stub2     = new EventCollectorStub();
            CompositeEventCollector collector = new CompositeEventCollector(stub1, stub2);
            int      eventId    = 12;
            Guid     instanceId = new Guid(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
            DateTime endTime    = new DateTime(2000, 1, 2, 3, 4, 5, 6);

            collector.OnEnd(eventId, instanceId, endTime);

            Assert.Equal(eventId, stub1.EndEventId);
            Assert.Equal(instanceId, stub1.EndInstanceId);
            Assert.Equal(endTime, stub1.EndTime);
            Assert.Equal(eventId, stub2.EndEventId);
            Assert.Equal(instanceId, stub2.EndInstanceId);
            Assert.Equal(endTime, stub2.EndTime);
        }
        public void OnEnd_passes_through_to_inner_collectors()
        {
            EventCollectorStub stub1 = new EventCollectorStub();
            EventCollectorStub stub2 = new EventCollectorStub();
            CompositeEventCollector collector = new CompositeEventCollector(stub1, stub2);
            int eventId = 12;
            Guid instanceId = new Guid(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
            DateTime endTime = new DateTime(2000, 1, 2, 3, 4, 5, 6);

            collector.OnEnd(eventId, instanceId, endTime);

            Assert.Equal(eventId, stub1.EndEventId);
            Assert.Equal(instanceId, stub1.EndInstanceId);
            Assert.Equal(endTime, stub1.EndTime);
            Assert.Equal(eventId, stub2.EndEventId);
            Assert.Equal(instanceId, stub2.EndInstanceId);
            Assert.Equal(endTime, stub2.EndTime);
        }