Ejemplo n.º 1
0
        public void CanIncrementProcessTypeCounter()
        {
            Guid             guid     = ProcessGuids.ProcessA;
            ProcessTypeCount instance = new ProcessTypeCount(guid.ToString());

            instance.Increment();
            instance.Increment();

            Assert.AreEqual(2, instance.Count);
        }
Ejemplo n.º 2
0
        public void Handle(ProcessStarted @event)
        {
            string           id      = ProcessTypeCount.GetIdFrom(@event.ProcessTypeId);
            ProcessTypeCount counter = GetOrCreateProcessTypeCountEntity(id);

            //execute change / update
            counter.Increment();

            //save - persist?
            repository.Save(counter);
        }