GroupByComparerRenderer.cs 457 B

12345678910111213141516171819
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. namespace UnityTest
  5. {
  6. public class GroupByComparerRenderer : AssertionListRenderer<Type>
  7. {
  8. protected override IEnumerable<IGrouping<Type, AssertionComponent>> GroupResult (IEnumerable<AssertionComponent> assertionComponents)
  9. {
  10. return assertionComponents.GroupBy (c => c.Action.GetType ());
  11. }
  12. protected override string GetStringKey (Type key)
  13. {
  14. return key.Name;
  15. }
  16. }
  17. }