public void ShouldSortByTypeFullNameAndAssignFullNameAsTypeId() { var sut = new MessageTypeCache(new[] { typeof(A.DTestMessage), typeof(B.CTestMessage), typeof(B.ATestMessage), typeof(A.BTestMessage) }); var all = sut.GetAllTypes().ToDictionary(x => x.Key, x => x.Value); Assert.Equal(4, all.Count); Assert.Equal(typeof(A.BTestMessage), all[typeof(A.BTestMessage).FullName !]);
public void ShouldBeEmptyWhenNoMessages() { var sut = new MessageTypeCache(Enumerable.Empty <Type>()); Assert.Empty(sut.GetAllTypes()); }