Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add another test for the ExecuteScalar method. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
221fbe52ecf92adcc11b49dbb70ab70b |
User & Date: | mistachkin 2011-09-21 21:46:54.341 |
Context
2011-09-22
| ||
00:28 | More pre-release doc updates. check-in: dc00c2cdbc user: mistachkin tags: trunk | |
2011-09-21
| ||
21:46 | Add another test for the ExecuteScalar method. check-in: 221fbe52ec user: mistachkin tags: trunk | |
08:27 | Allow finer control over the DateTime parsing and formatting on a per-connection basis. Also, update the Eagle library to the latest trunk. check-in: a5a8b8a682 user: mistachkin tags: trunk | |
Changes
Changes to test/TestCases.cs.
︙ | ︙ | |||
1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 | { reader.Read(); decimal d = (decimal)reader.GetValue(0); d = reader.GetDecimal(0); } } } [Test(Sequence = 30)] internal void VerifyInsert() { using (DbCommand cmd = _cnn.CreateCommand()) { cmd.CommandText = "SELECT Field1, Field2, [Fiëld3], [Fiæld4], Field5 FROM TestCase"; | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 | { reader.Read(); decimal d = (decimal)reader.GetValue(0); d = reader.GetDecimal(0); } } } [Test(Sequence = 98)] internal void ScalarPreTest() { using (DbCommand cmd = _cnn.CreateCommand()) { droptables.Add("SCALARTEST"); cmd.CommandText = "CREATE TABLE SCALARTEST(x INTEGER PRIMARY KEY, y)"; cmd.ExecuteNonQuery(); for (int i = 1; i <= 1000; i++) { DbParameter param1 = cmd.CreateParameter(); param1.ParameterName = "param1"; param1.DbType = DbType.Int32; param1.Value = i; DbParameter param2 = cmd.CreateParameter(); param2.ParameterName = "param2"; param2.DbType = DbType.Int32; param2.Value = i; cmd.CommandText = "INSERT OR REPLACE INTO SCALARTEST(x, y) VALUES(?, ?)"; cmd.Parameters.Clear(); cmd.Parameters.Add(param1); cmd.Parameters.Add(param2); cmd.ExecuteNonQuery(); } } } [Test(Sequence = 99)] internal void ScalarTest() { using (DbCommand cmd = _cnn.CreateCommand()) { cmd.CommandText = "SELECT x FROM SCALARTEST ORDER BY x"; cmd.ExecuteScalar(); } } [Test(Sequence = 30)] internal void VerifyInsert() { using (DbCommand cmd = _cnn.CreateCommand()) { cmd.CommandText = "SELECT Field1, Field2, [Fiëld3], [Fiæld4], Field5 FROM TestCase"; |
︙ | ︙ |