Esempio n. 1
0
 public void Store_1Department1User_Results2Tag1IdEach()
 {
     var id1 = Guid.NewGuid();
     var id2 = Guid.NewGuid();
     var store = new InMemoryEventStore();
     Assert.Equal(0, store.Tags.Count());
     store.Store(departmentTag, id1, 0, new IEvent[] { new NewDepartmentEvent(id1, "New Department 1"), new NewCommitteeEvent(id1, "Test Committee 1", "mandate") });
     store.Store(userTag, id2, 0, new IEvent[] { new NewUserEvent(id2, "Test User 1") });
     Assert.Equal(2, store.Tags.Count());
     Assert.Equal(1, store.AggregateList(departmentTag).Count());
     Assert.Equal(1, store.AggregateList(userTag).Count());
 }
Esempio n. 2
0
 public void Store_2Departments_Results1Tag2Ids()
 {
     var id1 = Guid.NewGuid();
     var id2 = Guid.NewGuid();
     var store = new InMemoryEventStore();
     Assert.Equal(0, store.Tags.Count());
     store.Store(departmentTag, id1, 0, new IEvent[] { new NewDepartmentEvent(id1, "Test Department 1") });
     store.Store(departmentTag, id2, 0, new IEvent[] { new NewDepartmentEvent(id2, "Test Department 2") });
     Assert.Equal(1, store.Tags.Count());
     Assert.Equal(2, store.AggregateList(departmentTag).Count());
 }