public void ClassWithInnerClass() { Faker faker = new Faker(); TwoClasses twoClasses = faker.Create <TwoClasses>(); Assert.IsTrue(twoClasses.x != 0); Assert.IsTrue(twoClasses.allTypes.X != 0); Assert.IsTrue(twoClasses.allTypes.Y != 0); Assert.IsTrue(twoClasses.allTypes.Z != 0); }
public static void FlagEnums_With_Different_Namespaces() { StringWriter sw = new StringWriter(); XmlTextWriter xml = new XmlTextWriter(sw); TwoClasses twoClasses = new TwoClasses { First = new FirstClass { TestingEnumValues = TestEnum.First }, Second = new SecondClass { TestingEnumValues = TestEnum.Second } }; // 43675 - This line throws with inconsistent Flag.type/namespace usage XmlSerializer ser = new XmlSerializer(typeof(TwoClasses)); ser.Serialize(xml, twoClasses); string s = sw.ToString(); Assert.Contains("enumtest", s); }