mirror of
https://github.com/fergalmoran/EFCore.NamingConventions.git
synced 2025-12-22 09:38:21 +00:00
File-scoped namespaces
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -2,33 +2,32 @@ using System.Globalization;
|
||||
using EFCore.NamingConventions.Internal;
|
||||
using Xunit;
|
||||
|
||||
namespace EFCore.NamingConventions.Test
|
||||
namespace EFCore.NamingConventions.Test;
|
||||
|
||||
public class RewriterTest
|
||||
{
|
||||
public class RewriterTest
|
||||
{
|
||||
[Fact]
|
||||
public void SnakeCase()
|
||||
=> Assert.Equal("full_name",
|
||||
new SnakeCaseNameRewriter(CultureInfo.InvariantCulture).RewriteName("FullName"));
|
||||
[Fact]
|
||||
public void SnakeCase()
|
||||
=> Assert.Equal("full_name",
|
||||
new SnakeCaseNameRewriter(CultureInfo.InvariantCulture).RewriteName("FullName"));
|
||||
|
||||
[Fact]
|
||||
public void UpperSnakeCase()
|
||||
=> Assert.Equal("FULL_NAME",
|
||||
new UpperSnakeCaseNameRewriter(CultureInfo.InvariantCulture).RewriteName("FullName"));
|
||||
[Fact]
|
||||
public void UpperSnakeCase()
|
||||
=> Assert.Equal("FULL_NAME",
|
||||
new UpperSnakeCaseNameRewriter(CultureInfo.InvariantCulture).RewriteName("FullName"));
|
||||
|
||||
[Fact]
|
||||
public void LowerCase()
|
||||
=> Assert.Equal("fullname",
|
||||
new LowerCaseNameRewriter(CultureInfo.InvariantCulture).RewriteName("FullName"));
|
||||
[Fact]
|
||||
public void LowerCase()
|
||||
=> Assert.Equal("fullname",
|
||||
new LowerCaseNameRewriter(CultureInfo.InvariantCulture).RewriteName("FullName"));
|
||||
|
||||
[Fact]
|
||||
public void CamelCase()
|
||||
=> Assert.Equal("fullName",
|
||||
new CamelCaseNameRewriter(CultureInfo.InvariantCulture).RewriteName("FullName"));
|
||||
[Fact]
|
||||
public void CamelCase()
|
||||
=> Assert.Equal("fullName",
|
||||
new CamelCaseNameRewriter(CultureInfo.InvariantCulture).RewriteName("FullName"));
|
||||
|
||||
[Fact]
|
||||
public void UpperCase()
|
||||
=> Assert.Equal("FULLNAME",
|
||||
new UpperCaseNameRewriter(CultureInfo.InvariantCulture).RewriteName("FullName"));
|
||||
}
|
||||
}
|
||||
[Fact]
|
||||
public void UpperCase()
|
||||
=> Assert.Equal("FULLNAME",
|
||||
new UpperCaseNameRewriter(CultureInfo.InvariantCulture).RewriteName("FullName"));
|
||||
}
|
||||
@@ -7,24 +7,23 @@ using Microsoft.EntityFrameworkCore.Sqlite.Diagnostics.Internal;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace Microsoft.EntityFrameworkCore.TestUtilities
|
||||
namespace Microsoft.EntityFrameworkCore.TestUtilities;
|
||||
|
||||
public class SqliteTestHelpers : TestHelpers
|
||||
{
|
||||
public class SqliteTestHelpers : TestHelpers
|
||||
protected SqliteTestHelpers()
|
||||
{
|
||||
protected SqliteTestHelpers()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static SqliteTestHelpers Instance { get; } = new();
|
||||
public static SqliteTestHelpers Instance { get; } = new();
|
||||
|
||||
public override IServiceCollection AddProviderServices(IServiceCollection services)
|
||||
=> services.AddEntityFrameworkSqlite();
|
||||
public override IServiceCollection AddProviderServices(IServiceCollection services)
|
||||
=> services.AddEntityFrameworkSqlite();
|
||||
|
||||
public override void UseProviderOptions(DbContextOptionsBuilder optionsBuilder)
|
||||
=> optionsBuilder.UseSqlite(new SqliteConnection("Data Source=:memory:"));
|
||||
public override void UseProviderOptions(DbContextOptionsBuilder optionsBuilder)
|
||||
=> optionsBuilder.UseSqlite(new SqliteConnection("Data Source=:memory:"));
|
||||
|
||||
#pragma warning disable EF1001
|
||||
public override LoggingDefinitions LoggingDefinitions { get; } = new SqliteLoggingDefinitions();
|
||||
public override LoggingDefinitions LoggingDefinitions { get; } = new SqliteLoggingDefinitions();
|
||||
#pragma warning restore EF1001
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user