Beispiel #1
0
        public void All_Fields_Are_Contained_In_Sources()
        {
            SizesSet sizes = new SizesBottle();

            FieldInfo[] fields = sizes.GetType().GetFields();
            foreach (FieldInfo field in fields)
            {
                Assert.Contains(field.Name, sizes.Sources);
            }
        }
Beispiel #2
0
        public void All_Sources_Have_Fields()
        {
            SizesSet sizes = new SizesBottle();

            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);
            }
        }