Exemplo n.º 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));
        }
Exemplo n.º 2
0
        public static void GetSpecialStringArgDescTest()
        {
            var instance = new CommonEventSpecialArgDescList();

            var index = (CommonEventStringArgIndex)1;

            var errorOccured = false;

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

            // エラーが発生しないこと
            Assert.IsFalse(errorOccured);
        }
Exemplo n.º 3
0
        public static void UpdateSpecialStringArgDescTest(bool isUpdateNull, bool isError)
        {
            var item  = isUpdateNull ? null : new CommonEventSpecialStringArgDesc();
            var index = (CommonEventStringArgIndex)2;

            var instance = new CommonEventSpecialArgDescList();

            var errorOccured = false;

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

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