You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
900 B
C#
27 lines
900 B
C#
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
using System;
|
|
using System.Reflection;
|
|
using Microsoft.EntityFrameworkCore.Design;
|
|
using Xunit;
|
|
|
|
namespace EntityFrameworkCore.Jet.Tests.Design
|
|
{
|
|
public abstract class DesignTimeProviderServicesTest
|
|
{
|
|
protected abstract Assembly GetRuntimeAssembly();
|
|
protected abstract Type GetDesignTimeServicesType();
|
|
|
|
[Fact]
|
|
public void Ensure_assembly_identity_matches()
|
|
{
|
|
var runtimeAssembly = GetRuntimeAssembly();
|
|
var dtAttribute = runtimeAssembly.GetCustomAttribute<DesignTimeProviderServicesAttribute>();
|
|
var dtType = GetDesignTimeServicesType();
|
|
Assert.NotNull(dtType);
|
|
|
|
Assert.NotNull(dtAttribute);
|
|
Assert.Equal(dtType.FullName, dtAttribute.TypeName);
|
|
}
|
|
}
|
|
} |