mirror of
https://github.com/zoriya/EntityFrameworkCore.Projectables.git
synced 2026-08-15 18:44:57 +00:00
Removed 2 temp tests
This commit is contained in:
-16
@@ -1,16 +0,0 @@
|
||||
// <auto-generated/>
|
||||
#nullable disable
|
||||
using System;
|
||||
using EntityFrameworkCore.Projectables;
|
||||
|
||||
namespace EntityFrameworkCore.Projectables.Generated
|
||||
{
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
static class _ContentExtensions_Outer
|
||||
{
|
||||
static global::System.Linq.Expressions.Expression<global::System.Func<string, string>> Expression()
|
||||
{
|
||||
return (string s) => s.Inner();
|
||||
}
|
||||
}
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
// <auto-generated/>
|
||||
#nullable disable
|
||||
using System;
|
||||
using EntityFrameworkCore.Projectables;
|
||||
using Foo;
|
||||
|
||||
namespace EntityFrameworkCore.Projectables.Generated
|
||||
{
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
static class Foo_ContentExtensions_Outer
|
||||
{
|
||||
static global::System.Linq.Expressions.Expression<global::System.Func<string, string>> Expression()
|
||||
{
|
||||
return (string s) => s.Inner();
|
||||
}
|
||||
}
|
||||
}
|
||||
-57
@@ -1615,63 +1615,6 @@ class EntityBase<TId> where TId : ICloneable, new() {
|
||||
return Verifier.Verify(result.GeneratedTrees[0].ToString());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public Task Issue65()
|
||||
{
|
||||
// issue: https://github.com/koenbeuk/EntityFrameworkCore.Projectables/issues/48
|
||||
|
||||
var compilation = CreateCompilation(@"
|
||||
using System;
|
||||
using EntityFrameworkCore.Projectables;
|
||||
|
||||
public static class ContentExtensions
|
||||
{
|
||||
public static string Inner(this string s) => s;
|
||||
|
||||
[Projectable(NullConditionalRewriteSupport = NullConditionalRewriteSupport.Ignore)]
|
||||
public static string Outer(this string s) => s?.Inner();
|
||||
}
|
||||
");
|
||||
|
||||
var result = RunGenerator(compilation);
|
||||
|
||||
Assert.Empty(result.Diagnostics);
|
||||
Assert.Single(result.GeneratedTrees);
|
||||
|
||||
return Verifier.Verify(result.GeneratedTrees[0].ToString());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public Task Issue652()
|
||||
{
|
||||
// issue: https://github.com/koenbeuk/EntityFrameworkCore.Projectables/issues/48
|
||||
|
||||
var compilation = CreateCompilation(@"
|
||||
using System;
|
||||
using EntityFrameworkCore.Projectables;
|
||||
|
||||
namespace Foo;
|
||||
|
||||
public static class ContentExtensions
|
||||
{
|
||||
[Projectable(NullConditionalRewriteSupport = NullConditionalRewriteSupport.Ignore)]
|
||||
public static string Outer(this string s) => s?.Inner();
|
||||
}
|
||||
|
||||
public static class ContentExtensions2
|
||||
{
|
||||
public static string Inner(this string s) => s;
|
||||
}
|
||||
");
|
||||
|
||||
var result = RunGenerator(compilation);
|
||||
|
||||
Assert.Empty(result.Diagnostics);
|
||||
Assert.Single(result.GeneratedTrees);
|
||||
|
||||
return Verifier.Verify(result.GeneratedTrees[0].ToString());
|
||||
}
|
||||
|
||||
#region Helpers
|
||||
|
||||
Compilation CreateCompilation(string source, bool expectedToCompile = true)
|
||||
|
||||
Reference in New Issue
Block a user