public void All_Fields_Are_Contained_In_Sources() { SizesSet sizes = new SizesCan(); FieldInfo[] fields = sizes.GetType().GetFields(); foreach (FieldInfo field in fields) { Assert.Contains(field.Name, sizes.Sources); } }
public void All_Sources_Have_Fields() { SizesSet sizes = new SizesCan(); FieldInfo[] fields = sizes.GetType().GetFields(); List <string> fieldNames = new List <string>(); foreach (FieldInfo field in fields) { fieldNames.Add(field.Name); } foreach (string source in sizes.Sources) { Assert.Contains(source, fieldNames); } }