public void SimpleStruct()
        {
            HelperStruct2 source = new HelperStruct2()
            {
                Helper = new HelperStruct1()
                {
                    PropOne = RandGen.GenerateInt()
                }
            };

            HelperStruct2 target = GetClone(source, 0);

            Assert.Equal(source, target);
            Assert.Equal(source.Helper.PropOne, target.Helper.PropOne);
        }
Exemple #2
0
        public void Setup()
        {
            _complexStruct = new HelperStruct2()
            {
                Helper = new HelperStruct1()
                {
                    PropOne   = RandGen.GenerateInt(),
                    PropTwo   = RandGen.GenerateInt(),
                    PropThree = RandGen.GenerateInt()
                }
            };

            _simpleStruct = new HelperStruct1()
            {
                PropOne   = RandGen.GenerateInt(),
                PropTwo   = RandGen.GenerateInt(),
                PropThree = RandGen.GenerateInt()
            };

            _nullStruct = default;
        }