Esempio n. 1
0
        public void ConvertType_Failure_XML()
        {
            var args1 = new Workflow.Core.Models.DataEventArgs <CustomType>(
                new CustomType()
            {
                FirstName = "first",
                LastName  = "last"
            });

            //I should be trying to convert an object, and not an array
            var result = args1.DataToType <CustomType[]>();
        }
Esempio n. 2
0
        public void ConvertType_Successful()
        {
            var args1 = new Workflow.Core.Models.DataEventArgs <CustomType[]>(
                new CustomType[] {
                new CustomType()
                {
                    FirstName = "first",
                    LastName  = "last"
                }
            });

            var result = args1.DataToType <CustomType[]>();

            Assert.AreEqual("first", result[0].FirstName);
        }