Browse Source

Added test: Default_Settings_With_TenantId

pull/4105/head
Halil İbrahim Kalkan 6 years ago
parent
commit
c2fa54729d
  1. 15
      framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo/Abp/BlobStoring/FileSystem/BlogFilePathCalculator_Tests.cs

15
framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo/Abp/BlobStoring/FileSystem/BlogFilePathCalculator_Tests.cs

@ -20,17 +20,28 @@ namespace Volo.Abp.BlobStoring.FileSystem
var separator = Path.DirectorySeparatorChar; var separator = Path.DirectorySeparatorChar;
_calculator.Calculate( _calculator.Calculate(
GetArgs($"C:{separator}my-files","my-container","my-blob") GetArgs($"C:{separator}my-files", "my-container", "my-blob")
).ShouldBe($"C:{separator}my-files{separator}host{separator}my-container{separator}my-blob"); ).ShouldBe($"C:{separator}my-files{separator}host{separator}my-container{separator}my-blob");
} }
[Fact]
public void Default_Settings_With_TenantId()
{
var separator = Path.DirectorySeparatorChar;
var tenantId = Guid.NewGuid();
_calculator.Calculate(
GetArgs($"C:{separator}my-files", "my-container", "my-blob", tenantId: tenantId)
).ShouldBe($"C:{separator}my-files{separator}tenants{separator}{tenantId:D}{separator}my-container{separator}my-blob");
}
[Fact] [Fact]
public void AppendContainerNameToBasePath_Set_To_False() public void AppendContainerNameToBasePath_Set_To_False()
{ {
var separator = Path.DirectorySeparatorChar; var separator = Path.DirectorySeparatorChar;
_calculator.Calculate( _calculator.Calculate(
GetArgs($"C:{separator}my-files","my-container","my-blob", appendContainerNameToBasePath: false) GetArgs($"C:{separator}my-files", "my-container", "my-blob", appendContainerNameToBasePath: false)
).ShouldBe($"C:{separator}my-files{separator}host{separator}my-blob"); ).ShouldBe($"C:{separator}my-files{separator}host{separator}my-blob");
} }

Loading…
Cancel
Save