Skip to content

Commit aab9ddf

Browse files
authored
Merge pull request #14 from sql-bi/extend-server-types
Added additional server types for issue #13
2 parents 507ef6a + e2eba58 commit aab9ddf

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

src/Dax.Formatter.Tests/Models/DaxFormatterMultipleRequestTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ public void DaxFormatterMultipleRequest_SensitiveDatabaseNameIsProtected()
4747
[InlineData(ServerType.PowerBIReportServer, "PBI Report Server")]
4848
[InlineData(ServerType.PowerPivot, "PowerPivot")]
4949
[InlineData(ServerType.SSDT, "SSDT")]
50+
[InlineData(ServerType.AzureAnalysisServices, "AzureAS")]
51+
[InlineData(ServerType.PowerBIService, "PBI Service")]
52+
[InlineData(ServerType.Offline, "Offline")]
5053
public void DaxFormatterMultipleRequest_ServerTypeSerialization(ServerType serverType, string expectedServerType)
5154
{
5255
var request = new DaxFormatterMultipleRequest

src/Dax.Formatter.Tests/Models/DaxFormatterSingleRequestTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public void DaxFormatterSingleRequest_SensitiveDatabaseNameIsProtected()
3939
[InlineData(ServerType.PowerBIReportServer, "PBI Report Server")]
4040
[InlineData(ServerType.PowerPivot, "PowerPivot")]
4141
[InlineData(ServerType.SSDT, "SSDT")]
42+
[InlineData(ServerType.AzureAnalysisServices, "AzureAS")]
43+
[InlineData(ServerType.PowerBIService, "PBI Service")]
44+
[InlineData(ServerType.Offline, "Offline")]
4245
public void DaxFormatterSingleRequest_ServerTypeSerialization(ServerType serverType, string expectedServerType)
4346
{
4447
var request = new DaxFormatterSingleRequest

src/Dax.Formatter/AnalysisServices/ServerType.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ public enum ServerType
1818
PowerPivot,
1919

2020
[EnumMember(Value = "SSDT")]
21-
SSDT
22-
}
21+
SSDT,
22+
23+
[EnumMember(Value = "AzureAS")]
24+
AzureAnalysisServices,
25+
26+
[EnumMember(Value = "PBI Service")]
27+
PowerBIService,
28+
29+
[EnumMember(Value = "Offline")]
30+
Offline
31+
32+
}
2333
}

0 commit comments

Comments
 (0)