Esempio n. 1
0
        public void GetRawValue()
        {
            SqlType type = new SqlImage(data, ParameterDirection.Input);
            Assert.AreEqual(data, type.GetRawValue());

            type = new SqlImage(null, ParameterDirection.Input);
            Assert.Null(type.GetRawValue());
        }
Esempio n. 2
0
        public void GetParameter()
        {
            SqlType type = new SqlImage(data, ParameterDirection.Input);
            TestHelper.AssertSqlParameter(type.GetParameter(), SqlDbType.Image, data, size: -1);

            type = new SqlImage(null, ParameterDirection.Input);
            TestHelper.AssertSqlParameter(type.GetParameter(), SqlDbType.Image, DBNull.Value, size: -1);
        }
Esempio n. 3
0
        public void CreateMetaData()
        {
            Assert.Throws<TypeCannotBeUsedAsAClrTypeException>(() => SqlImage.GetTypeHandler().CreateMetaData(null));

            SqlTypeHandler col = new SqlImage(data, ParameterDirection.Input);
            var meta = col.CreateMetaData("Test");
            Assert.AreEqual(SqlDbType.Image, meta.SqlDbType);
            Assert.AreEqual(-1, meta.MaxLength);
            Assert.AreEqual("Test", meta.Name);
        }
        public ArgosRequestFactory(BenchmarkConfiguration Configuration, SqlImage Image)
        {
            m_Configuration = Configuration;
            m_SqlImage      = Image;

            m_GetRequests.Add(GetHierarchy);
            m_GetRequests.Add(GetEntityTypeAttributes);
            m_GetRequests.Add(GetEntityTypeEntityMappings);
            m_GetRequests.Add(GetEntityChildren);
            m_GetRequests.Add(GetEntity);
            m_GetRequests.Add(GetEntityEventTypes);
            m_GetRequests.Add(GetEntityEvents);
            m_GetRequests.Add(GetEventTypes);
            m_GetRequests.Add(GetEventType);
            m_GetRequests.Add(GetEventTypeAttributes);
            m_GetRequests.Add(GetEventTypeQueries);
            m_GetRequests.Add(GetEventTypeEntityMappings);
            m_GetRequests.Add(GetEventQuery);
            m_GetRequests.Add(GetEntityMapping);
        }
Esempio n. 5
0
 public void CreateParamFromValue()
 {
     Assert.Throws <TypeCannotBeUsedAsAClrTypeException>(() => SqlImage.GetTypeHandler().CreateParamFromValue("Test", null));
 }
Esempio n. 6
0
 public void GetTypeHandler()
 {
     Assert.IsInstanceOf <SqlTypeHandler>(SqlImage.GetTypeHandler());
 }