Removed 2 temp tests

This commit is contained in:
Koen
2023-04-19 19:53:42 +01:00
parent 5dcc5a23f7
commit 458509c76c
3 changed files with 0 additions and 90 deletions
@@ -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();
}
}
}
@@ -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();
}
}
}
@@ -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)