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.
EntityFrameworkCore.Jet/test/EFCore.SqlServerCompact.Tests/Design/DesignTimeProvidersServices...

27 lines
911 B
C#

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Reflection;
using Xunit;
namespace Microsoft.EntityFrameworkCore.Design
{
public abstract class DesignTimeProviderServicesTest
{
protected abstract Assembly GetRuntimeAssembly();
protected abstract Type GetDesignTimeServicesType();
[Fact]
public void Ensure_assmebly_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);
}
}
}