public void Execute_CorrectColumnOrder_NoErrors()
        {
            var proc = new UserDefinedTableStoredProcedure();

            proc.UserDefinedTableParameter = new List<AllTypesUserDefinedTable>()
            {
                new AllTypesUserDefinedTable()
                {
                    ParameterDecimal = 555m /* ParameterDecimal - Column 10 */
                }
            };

            var result = ExecuteStoredProcedureSingle<UserDefinedTableStoredProcedureReturn>(proc);

            Assert.AreEqual(555m, result.ParameterBigInt);
        }
        public void Execute_ParameterBinary_ReturnCorrectValue()
        {
            var proc = new UserDefinedTableStoredProcedure();

            proc.UserDefinedTableParameter = new List<AllTypesUserDefinedTable>()
            {
                new AllTypesUserDefinedTable()
                {
                    ParameterBinary = GetBytes("Kourtney Wood")
                }
            };

            var result = ExecuteStoredProcedureSingle<UserDefinedTableStoredProcedureReturn>(proc);

            Assert.AreEqual(GetBytes("Kourtney Wood"), result.ParameterBinary);
        }
        public void Execute_ParameterBit_ReturnCorrectValue()
        {
            var proc = new UserDefinedTableStoredProcedure();

            proc.UserDefinedTableParameter = new List<AllTypesUserDefinedTable>()
            {
                new AllTypesUserDefinedTable()
                {
                    ParameterBit = true
                }
            };

            var result = ExecuteStoredProcedureSingle<UserDefinedTableStoredProcedureReturn>(proc);

            Assert.AreEqual(true, result.ParameterBit);
        }
        public void Execute_ParameterNvarChar_ReturnCorrectValue()
        {
            var proc = new UserDefinedTableStoredProcedure();

            proc.UserDefinedTableParameter = new List<AllTypesUserDefinedTable>()
            {
                new AllTypesUserDefinedTable()
                {
                    ParameterNvarChar = "England"
                }
            };

            var result = ExecuteStoredProcedureSingle<UserDefinedTableStoredProcedureReturn>(proc);

            Assert.AreEqual("England", result.ParameterNvarChar);
        }
        public void Execute_ParameterXml_ReturnCorrectValue()
        {
            var proc = new UserDefinedTableStoredProcedure();

            proc.UserDefinedTableParameter = new List<AllTypesUserDefinedTable>()
            {
                new AllTypesUserDefinedTable()
                {
                    ParameterXml = "<EntityFramework />"
                }
            };

            var result = ExecuteStoredProcedureSingle<UserDefinedTableStoredProcedureReturn>(proc);

            Assert.AreEqual("<EntityFramework />", result.ParameterXml);
        }
        public void Execute_ParameterUniqueIdentifier_ReturnCorrectValue()
        {
            var proc = new UserDefinedTableStoredProcedure();

            var uniqueIdentifier = Guid.NewGuid();
            proc.UserDefinedTableParameter = new List<AllTypesUserDefinedTable>()
            {
                new AllTypesUserDefinedTable()
                {
                    ParameterUniqueIdentifier = uniqueIdentifier
                }
            };

            var result = ExecuteStoredProcedureSingle<UserDefinedTableStoredProcedureReturn>(proc);

            Assert.AreEqual(uniqueIdentifier, result.ParameterUniqueIdentifier);
        }
        public void Execute_ParameterTime_ReturnCorrectValue()
        {
            var proc = new UserDefinedTableStoredProcedure();

            proc.UserDefinedTableParameter = new List<AllTypesUserDefinedTable>()
            {
                new AllTypesUserDefinedTable()
                {
                    ParameterTime = new TimeSpan(0, 2,88,2)
                }
            };

            var result = ExecuteStoredProcedureSingle<UserDefinedTableStoredProcedureReturn>(proc);

            Assert.AreEqual(new TimeSpan(0, 2, 88, 2), result.ParameterTime);
        }
        public void Execute_ParameterSmallDateTime_ReturnCorrectValue()
        {
            var proc = new UserDefinedTableStoredProcedure();

            proc.UserDefinedTableParameter = new List<AllTypesUserDefinedTable>()
            {
                new AllTypesUserDefinedTable()
                {
                    ParameterSmallDateTime = new DateTime(2014,03,08)
                }
            };

            var result = ExecuteStoredProcedureSingle<UserDefinedTableStoredProcedureReturn>(proc);

            Assert.AreEqual(new DateTime(2014, 03, 08), result.ParameterSmallDateTime);
        }
        public void Execute_ParameterNText_ReturnCorrectValue()
        {
            var proc = new UserDefinedTableStoredProcedure();

            proc.UserDefinedTableParameter = new List<AllTypesUserDefinedTable>()
            {
                new AllTypesUserDefinedTable()
                {
                    ParameterNText = "Michael Rodda"
                }
            };

            var result = ExecuteStoredProcedureSingle<UserDefinedTableStoredProcedureReturn>(proc);

            Assert.AreEqual("Michael Rodda", result.ParameterNText);
        }
        public void Execute_ParameterDateTimeOffset_ReturnCorrectValue()
        {
            var proc = new UserDefinedTableStoredProcedure();

            proc.UserDefinedTableParameter = new List<AllTypesUserDefinedTable>()
            {
                new AllTypesUserDefinedTable()
                {
                    ParameterDateTimeOffset = new DateTimeOffset(2014, 5, 2, 9, 4, 8, new TimeSpan(0, 13, 22 , 0))
                }
            };

            var result = ExecuteStoredProcedureSingle<UserDefinedTableStoredProcedureReturn>(proc);

            Assert.AreEqual(new DateTimeOffset(2014, 5, 2, 9, 4, 8, new TimeSpan(0, 13, 22, 0)), result.ParameterDateTimeOffset);
        }