diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftAzureAnalysisServicesDataSourceItemFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftAzureAnalysisServicesDataSourceItemFixture.cs new file mode 100644 index 0000000..b6675b4 --- /dev/null +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftAzureAnalysisServicesDataSourceItemFixture.cs @@ -0,0 +1,28 @@ +using Reveal.Sdk.Dom.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace Reveal.Sdk.Dom.Tests.Data.DataSourceItems +{ + public class MicrosoftAzureAnalysisServicesDataSourceItemFixture + { + [Fact] + public void Constructor_SetsTitleAndDatasource_AsProvided() + { + // Arrange + var dataSource = new MicrosoftAzureAnalysisServicesDataSource(); + var title = "Test title"; + + // Act + var dataSourceItem = new MicrosoftAzureAnalysisServicesDataSourceItem(title, dataSource); + + // Assert + Assert.Equal(title, dataSourceItem.Title); + Assert.Equal(dataSource, dataSourceItem.DataSource); + } + } +} diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftAzureSqlServerDataSourceItemFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftAzureSqlServerDataSourceItemFixture.cs new file mode 100644 index 0000000..f3b4558 --- /dev/null +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftAzureSqlServerDataSourceItemFixture.cs @@ -0,0 +1,28 @@ +using Reveal.Sdk.Dom.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace Reveal.Sdk.Dom.Tests.Data.DataSourceItems +{ + public class MicrosoftAzureSqlServerDataSourceItemFixture + { + [Fact] + public void Constructor_SetsTitleAndDatasource_AsProvided() + { + // Arrange + var dataSource = new MicrosoftAzureSqlServerDataSource(); + var title = "Test title"; + + // Act + var dataSourceItem = new MicrosoftAzureSqlServerDataSourceItem(title, dataSource); + + // Assert + Assert.Equal(title, dataSourceItem.Title); + Assert.Equal(dataSource, dataSourceItem.DataSource); + } + } +} diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftAzureSynapseAnalyticsDataSourceItemFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftAzureSynapseAnalyticsDataSourceItemFixture.cs new file mode 100644 index 0000000..0138907 --- /dev/null +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftAzureSynapseAnalyticsDataSourceItemFixture.cs @@ -0,0 +1,28 @@ +using Reveal.Sdk.Dom.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace Reveal.Sdk.Dom.Tests.Data.DataSourceItems +{ + public class MicrosoftAzureSynapseAnalyticsDataSourceItemFixture + { + [Fact] + public void Constructor_SetsTitleAndDatasource_AsProvided() + { + // Arrange + var dataSource = new MicrosoftAzureSynapseAnalyticsDataSource(); + var title = "Test title"; + + // Act + var dataSourceItem = new MicrosoftAzureSynapseAnalyticsDataSourceItem(title, dataSource); + + // Assert + Assert.Equal(title, dataSourceItem.Title); + Assert.Equal(dataSource, dataSourceItem.DataSource); + } + } +} diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftOneDriveDataSourceItemFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftOneDriveDataSourceItemFixture.cs new file mode 100644 index 0000000..0a52643 --- /dev/null +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftOneDriveDataSourceItemFixture.cs @@ -0,0 +1,46 @@ +using Reveal.Sdk.Dom.Core.Extensions; +using Reveal.Sdk.Dom.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace Reveal.Sdk.Dom.Tests.Data.DataSourceItems +{ + public class MicrosoftOneDriveDataSourceItemFixture + { + + [Fact] + public void Constructor_SetsTitleAndDatasource_AsProvided() + { + // Arrange + var dataSource = new MicrosoftOneDriveDataSource(); + var title = "Test title"; + + // Act + var dataSourceItem = new MicrosoftOneDriveDataSourceItem(title, dataSource); + + // Assert + Assert.Equal(title, dataSourceItem.Title); + Assert.Equal(dataSource, dataSourceItem.DataSource); + } + + [Fact] + public void Identifier_SaveValueAndProperties_WhenSet() + { + // Arrange + var dataSource = new MicrosoftOneDriveDataSource(); + var dataSourceItem = new MicrosoftOneDriveDataSourceItem("Test", dataSource); + var identifier = "Identifier"; + + // Act + dataSourceItem.Identifier = identifier; + + // Assert + Assert.Equal(identifier, dataSourceItem.Identifier); + Assert.Equal(identifier, dataSourceItem.Properties.GetValue("Identifier")); + } + } +} diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftSharePointDataSourceItemFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftSharePointDataSourceItemFixture.cs new file mode 100644 index 0000000..b73a21b --- /dev/null +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MicrosoftSharePointDataSourceItemFixture.cs @@ -0,0 +1,28 @@ +using Reveal.Sdk.Dom.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace Reveal.Sdk.Dom.Tests.Data.DataSourceItems +{ + public class MicrosoftSharePointDataSourceItemFixture + { + [Fact] + public void Constructor_SetsTitleAndDatasource_AsProvided() + { + // Arrange + var dataSource = new MicrosoftSharePointDataSource(); + var title = "Test title"; + + // Act + var dataSourceItem = new MicrosoftSharePointDataSourceItem(title, dataSource); + + // Assert + Assert.Equal(title, dataSourceItem.Title); + Assert.Equal(dataSource, dataSourceItem.DataSource); + } + } +} diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAnalysisServicesDataSourceFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAnalysisServicesDataSourceFixture.cs new file mode 100644 index 0000000..79d40de --- /dev/null +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAnalysisServicesDataSourceFixture.cs @@ -0,0 +1,66 @@ +using Reveal.Sdk.Dom.Core.Extensions; +using Reveal.Sdk.Dom.Data; +using Xunit; + +namespace Reveal.Sdk.Dom.Tests.Data.DataSources +{ + public class MicrosoftAnalysisServicesDataSourceFixture + { + [Fact] + public void Constructor_SetProviderToMicrosoftAnalysisServices_WhenConstructed() + { + // Act + var dataSource = new MicrosoftAnalysisServicesDataSource(); + + // Assert + Assert.Equal(DataSourceProvider.MicrosoftAnalysisServices, dataSource.Provider); + } + + [Fact] + public void Catalog_SaveValueAndProperties_WhenSet() + { + // Arrange + var dataSource = new MicrosoftAnalysisServicesDataSource(); + var catalog = "TestCatalog"; + + // Act + dataSource.Catalog = catalog; + + // Assert + Assert.Equal(catalog, dataSource.Catalog); + Assert.Equal(catalog, dataSource.Properties.GetValue("Catalog")); + } + + [Fact] + public void Host_SaveValueAndProperties_WhenSet() + { + // Arrange + var dataSource = new MicrosoftAnalysisServicesDataSource(); + var host = "TestHost"; + + // Act + dataSource.Host = host; + + // Assert + Assert.Equal(host, dataSource.Host); + Assert.Equal(host, dataSource.Properties.GetValue("Host")); + } + + [Fact] + public void Port_SaveValueAndProperties_WhenSet() + { + // Arrange + var dataSource = new MicrosoftAnalysisServicesDataSource(); + var port = 8123; + + // Act + dataSource.Port = port; + + // Assert + Assert.Equal(port, dataSource.Port); + Assert.Equal(port, dataSource.Properties.GetValue("Port")); + } + } + + +} diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAzureAnalysisServicesDataSourceFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAzureAnalysisServicesDataSourceFixture.cs new file mode 100644 index 0000000..dd5d306 --- /dev/null +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAzureAnalysisServicesDataSourceFixture.cs @@ -0,0 +1,35 @@ +using Reveal.Sdk.Dom.Core.Extensions; +using Reveal.Sdk.Dom.Data; +using Xunit; + +namespace Reveal.Sdk.Dom.Tests.Data.DataSources +{ + public class MicrosoftAzureAnalysisServicesDataSourceFixture + { + [Fact] + public void Constructor_SetProviderToMicrosoftAzureAnalysisServices_WhenConstructed() + { + // Act + var dataSource = new MicrosoftAzureAnalysisServicesDataSource(); + + // Assert + Assert.Equal(DataSourceProvider.MicrosoftAzureAnalysisServices, dataSource.Provider); + } + + [Fact] + public void ServerUrl_SaveValueAndProperties_WhenSet() + { + // Arrange + var dataSource = new MicrosoftAzureAnalysisServicesDataSource(); + var serverUrl = "TestServerUrl"; + + // Act + dataSource.ServerUrl = serverUrl; + + // Assert + Assert.Equal(serverUrl, dataSource.ServerUrl); + Assert.Equal(serverUrl, dataSource.Properties.GetValue("ServerUrl")); + } + + } +} diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAzureSqlServerDataSourceFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAzureSqlServerDataSourceFixture.cs new file mode 100644 index 0000000..75e3f4d --- /dev/null +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAzureSqlServerDataSourceFixture.cs @@ -0,0 +1,39 @@ +using Reveal.Sdk.Dom.Core.Extensions; +using Reveal.Sdk.Dom.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace Reveal.Sdk.Dom.Tests.Data.DataSources +{ + public class MicrosoftAzureSqlServerDataSourceFixture + { + [Fact] + public void Constructor_SetProviderToMicrosoftAzureSqlServer_WhenConstructed() + { + // Act + var dataSource = new MicrosoftAzureSqlServerDataSource(); + + // Assert + Assert.Equal(DataSourceProvider.MicrosoftAzureSqlServer, dataSource.Provider); + } + + [Fact] + public void TrustServerCertificate_SaveValueAndProperties_WhenSet() + { + // Arrange + var dataSource = new MicrosoftAzureSqlServerDataSource(); + var trustServerCertificate = false; + + // Act + dataSource.TrustServerCertificate = trustServerCertificate; + + // Assert + Assert.Equal(trustServerCertificate, dataSource.TrustServerCertificate); + Assert.Equal(trustServerCertificate, dataSource.Properties.GetValue("TrustServerCertificate")); + } + } +} diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAzureSynapseAnalyticsDataSourceFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAzureSynapseAnalyticsDataSourceFixture.cs new file mode 100644 index 0000000..adcff4c --- /dev/null +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAzureSynapseAnalyticsDataSourceFixture.cs @@ -0,0 +1,23 @@ +using Reveal.Sdk.Dom.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace Reveal.Sdk.Dom.Tests.Data.DataSources +{ + public class MicrosoftAzureSynapseAnalyticsDataSourceFixture + { + [Fact] + public void Constructor_SetProviderToMicrosoftAzureSqlServer_WhenConstructed() + { + // Act + var dataSource = new MicrosoftAzureSynapseAnalyticsDataSource(); + + // Assert + Assert.Equal(DataSourceProvider.MicrosoftAzureSynapseAnalytics, dataSource.Provider); + } + } +} diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftOneDriveDataSourceFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftOneDriveDataSourceFixture.cs new file mode 100644 index 0000000..a2e6ff2 --- /dev/null +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftOneDriveDataSourceFixture.cs @@ -0,0 +1,23 @@ +using Reveal.Sdk.Dom.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace Reveal.Sdk.Dom.Tests.Data.DataSources +{ + public class MicrosoftOneDriveDataSourceFixture + { + [Fact] + public void Constructor_SetProviderToMicrosoftAzureSqlServer_WhenConstructed() + { + // Act + var dataSource = new MicrosoftOneDriveDataSource(); + + // Assert + Assert.Equal(DataSourceProvider.MicrosoftOneDrive, dataSource.Provider); + } + } +} diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftSharePointDataSourceFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftSharePointDataSourceFixture.cs new file mode 100644 index 0000000..5e08181 --- /dev/null +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftSharePointDataSourceFixture.cs @@ -0,0 +1,23 @@ +using Reveal.Sdk.Dom.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace Reveal.Sdk.Dom.Tests.Data.DataSources +{ + public class MicrosoftSharePointDataSourceFixture + { + [Fact] + public void Constructor_SetProviderToMicrosoftAzureSqlServer_WhenConstructed() + { + // Act + var dataSource = new MicrosoftSharePointDataSource(); + + // Assert + Assert.Equal(DataSourceProvider.MicrosoftSharePoint, dataSource.Provider); + } + } +}