MySql.Data.Entity.Tests.ProviderManifestTests.TestingMaxLengthFacet C# (CSharp) Method

TestingMaxLengthFacet() private method

private TestingMaxLengthFacet ( ) : void
return void
    public void TestingMaxLengthFacet()
    {
      using (MySqlConnection connection = new MySqlConnection(GetConnectionString(true)))
      {
        MySqlProviderManifest pm = new MySqlProviderManifest(Version.ToString());
        TypeUsage tu = TypeUsage.CreateStringTypeUsage(
          PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.String), false, false);
        TypeUsage result = pm.GetStoreType(tu);
        Assert.AreEqual("longtext", result.EdmType.Name);

        tu = TypeUsage.CreateStringTypeUsage(
          PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.String), false, false, Int32.MaxValue);
        result = pm.GetStoreType(tu);
        Assert.AreEqual("longtext", result.EdmType.Name);

        tu = TypeUsage.CreateStringTypeUsage(
          PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.String), false, false, 70000);
        result = pm.GetStoreType(tu);
        Assert.AreEqual("mediumtext", result.EdmType.Name);

      }
    }