示例#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());
        }
示例#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);
        }
示例#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);
        }
示例#5
0
 public void CreateParamFromValue()
 {
     Assert.Throws <TypeCannotBeUsedAsAClrTypeException>(() => SqlImage.GetTypeHandler().CreateParamFromValue("Test", null));
 }
示例#6
0
 public void GetTypeHandler()
 {
     Assert.IsInstanceOf <SqlTypeHandler>(SqlImage.GetTypeHandler());
 }