public void GetEnumPairs_AsDictionary(Type enumType) { // Act Dictionary <string, int> pairs = EnumExts.GetEnumPairs(enumType); // Assert Assert.Greater(pairs.Count, 0); pairs.ForEach(x => { Log("{0}: {1}", x.Key, x.Value); }); }
public void ForNonEnumType_GetEnumPairs_ThrowsException() { // Assert Assert.Throws <ArgumentException>(() => EnumExts.GetEnumPairs(typeof(Country))); }