LCOV - code coverage report
Current view: top level - Cqrs.Tests/Substitutes - TestEventStoreWithBugs.cs Hit Total Coverage
Test: doc-coverage.info Lines: 0 6 0.0 %
Date: 2017-07-26

          Line data    Source code
       1             : using System;
       2             : using System.Collections.Generic;
       3             : using System.Linq;
       4             : using Cqrs.Events;
       5             : using Cqrs.Authentication;
       6             : 
       7             : namespace Cqrs.Tests.Substitutes
       8             : {
       9             :         public class TestEventStoreWithBugs : IEventStore<ISingleSignOnToken>
      10           0 :         {
      11           0 :                 public void Save(Type aggregateRootType, IEvent<ISingleSignOnToken> @event)
      12             :                 {
      13             :                 }
      14             : 
      15           0 :                 public IEnumerable<IEvent<ISingleSignOnToken>> Get<T>(Guid aggregateId, bool useLastEventOnly = false, int fromVersion = -1)
      16             :                 {
      17             :                         return Get(typeof (T), aggregateId, useLastEventOnly, fromVersion);
      18             :                 }
      19             : 
      20           0 :                 public IEnumerable<IEvent<ISingleSignOnToken>> Get(Type aggregateType, Guid aggregateId, bool useLastEventOnly = false, int fromVersion = -1)
      21             :                 {
      22             :                         if (aggregateId == Guid.Empty)
      23             :                         {
      24             :                                 return new List<IEvent<ISingleSignOnToken>>();
      25             :                         }
      26             : 
      27             :                         return new List<IEvent<ISingleSignOnToken>>
      28             :                         {
      29             :                                 new TestAggregateDidSomething {Id = aggregateId, Version = 3},
      30             :                                 new TestAggregateDidSomething {Id = aggregateId, Version = 4},
      31             :                                 new TestAggregateDidSomethingElse {Id = aggregateId, Version = 2}
      32             :                         }
      33             :                         .Where(x => x.Version > fromVersion);
      34             :                 }
      35             : 
      36           0 :                 public IEnumerable<EventData> Get(Guid correlationId)
      37             :                 {
      38             :                         return Enumerable.Empty<EventData>();
      39             :                 }
      40             : 
      41           0 :                 public void Save<T>(IEvent<ISingleSignOnToken> eventDescriptor)
      42             :                 {
      43             :                 }
      44             :         }
      45             : }

Generated by: LCOV version 1.10