Skip to content

Commit

Permalink
greenify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sholtee committed Jan 10, 2021
1 parent 1c46c3a commit 4ef8ff2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions TEST/ProxyGen.Tests/Generators/DuckGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void DuckGenerator_ShouldCacheTheGeneratedAssemblyIfCacheDirectoryIsSet()
string tmpDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "tmp");
Directory.CreateDirectory(tmpDir);

string cacheFile = Path.Combine(tmpDir, generator.TypeResolutionStrategy.AssemblyName);
string cacheFile = Path.Combine(tmpDir, $"{generator.TypeResolutionStrategy.AssemblyName}.dll");

if (File.Exists(cacheFile))
File.Delete(cacheFile);
Expand All @@ -253,7 +253,7 @@ public void DuckGenerator_ShouldUseTheCachedAssemblyIfTheCacheDirectoryIsSet()

string
cacheDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
cacheFile = Path.Combine(cacheDir, generator.TypeResolutionStrategy.AssemblyName);
cacheFile = Path.Combine(cacheDir, $"{generator.TypeResolutionStrategy.AssemblyName}.dll");

((RuntimeCompiledTypeResolutionStrategy) generator.TypeResolutionStrategy).CacheDir = cacheDir;

Expand Down
4 changes: 2 additions & 2 deletions TEST/ProxyGen.Tests/Generators/ProxyGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public void ProxyGenerator_ShouldCacheTheGeneratedAssemblyIfCacheDirectoryIsSet(
string tmpDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "tmp");
Directory.CreateDirectory(tmpDir);

string cacheFile = Path.Combine(tmpDir, generator.TypeResolutionStrategy.AssemblyName);
string cacheFile = Path.Combine(tmpDir, $"{generator.TypeResolutionStrategy.AssemblyName}.dll");

if (File.Exists(cacheFile))
File.Delete(cacheFile);
Expand All @@ -480,7 +480,7 @@ public void ProxyGenerator_ShouldUseTheCachedAssemblyIfTheCacheDirectoryIsSet()
cacheDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
cacheFile = Path.Combine(
cacheDir,
generator.TypeResolutionStrategy.AssemblyName);
$"{generator.TypeResolutionStrategy.AssemblyName}.dll");

((RuntimeCompiledTypeResolutionStrategy) generator.TypeResolutionStrategy).CacheDir = cacheDir;
Type gt = generator.TypeResolutionStrategy.Resolve();
Expand Down

0 comments on commit 4ef8ff2

Please sign in to comment.