public void GetFieldsTest()
        {
            var obj     = new Controller3();
            var members = new List <FieldInfo>();

            obj.GetFields(obj.GetType(), members);
            Assert.That(members.Where(m => m.Name == "nonserialized").Any(), Is.False);
            Assert.That(members.Where(m => m.Name == "nonserializable").Any(), Is.False);
        }
        public void GetValuesSetValuesTest()
        {
            var src = new Controller3();

            src.String1 = "String 1";
            src.String2 = "String 2";
            src.String3 = "String 3";
            var values = src.GetValues();

            var dst = new Controller3();

            dst.SetValues(values);

            Assert.Multiple(() =>
            {
                Assert.That(dst.String1, Is.EqualTo(src.String1));
                Assert.That(dst.String2, Is.EqualTo(src.String2));
                Assert.That(dst.String3, Is.EqualTo(src.String3));
            });
        }
 public void SerlalizeTest()
 {
     var obj   = new Controller3();
     var bytes = obj.Serialize();  // throws if [NonSerialized] is not respected
 }