Beispiel #1
0
        public static void SerializeTest()
        {
            var target = new CommonEventSpecialArgDescList();

            target.UpdateSpecialNumberArgDesc(0,
                                              new CommonEventSpecialNumberArgDesc
            {
                ArgName   = "引数名",
                InitValue = 33,
            });
            var clone = DeepCloner.DeepClone(target);

            Assert.IsTrue(clone.Equals(target));
        }
Beispiel #2
0
        public static void UpdateSpecialNumberArgDescTest(bool isUpdateNull, bool isError)
        {
            var item  = isUpdateNull ? null : new CommonEventSpecialNumberArgDesc();
            var index = (CommonEventNumberArgIndex)3;

            var instance = new CommonEventSpecialArgDescList();

            var errorOccured = false;

            try
            {
                instance.UpdateSpecialNumberArgDesc(index, item);
            }
            catch (Exception ex)
            {
                logger.Exception(ex);
                errorOccured = true;
            }

            // エラーフラグが一致すること
            Assert.AreEqual(errorOccured, isError);
        }