Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 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;
        }