Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add microsoft UT #83

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

hainv-ohio
Copy link

No description provided.

@hainv-ohio hainv-ohio linked an issue Nov 18, 2024 that may be closed by this pull request
12 tasks
var dataSourceItem = new MicrosoftAzureAnalysisServicesDataSourceItem(title, dataSource);

// Assert
Assert.Equal(title, dataSourceItem.Title);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use Theory to increase the coverage of unit tests. For ex the commit: https://github.com/RevealBi/Reveal.Sdk.Dom/pull/93/commits/051374207ac976bf40077db08ac82c5c5948b088

The base constructor should also check:

  • Assert.Equal(dataSource.Id, dataSourceItem.DataSourceId);
  • Assert.Equal(expectedDSTitle, dataSourceItem.DataSource.Item);

var dataSourceItem = new MicrosoftAzureSqlServerDataSourceItem(title, dataSource);

// Assert
Assert.Equal(title, dataSourceItem.Title);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use Theory to increase the coverage of unit tests. For ex the commit: https://github.com/RevealBi/Reveal.Sdk.Dom/pull/93/commits/051374207ac976bf40077db08ac82c5c5948b088

The base constructor should also check:

  • Assert.Equal(dataSource.Id, dataSourceItem.DataSourceId);
  • Assert.Equal(expectedDSTitle, dataSourceItem.DataSource.Item);

var dataSourceItem = new MicrosoftAzureSynapseAnalyticsDataSourceItem(title, dataSource);

// Assert
Assert.Equal(title, dataSourceItem.Title);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use Theory to increase the coverage of unit tests. For ex the commit: https://github.com/RevealBi/Reveal.Sdk.Dom/pull/93/commits/051374207ac976bf40077db08ac82c5c5948b088

The base constructor should also check:

  • Assert.Equal(dataSource.Id, dataSourceItem.DataSourceId);
  • Assert.Equal(expectedDSTitle, dataSourceItem.DataSource.Item);

var dataSourceItem = new MicrosoftOneDriveDataSourceItem(title, dataSource);

// Assert
Assert.Equal(title, dataSourceItem.Title);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use Theory to increase the coverage of unit tests. For ex the commit: https://github.com/RevealBi/Reveal.Sdk.Dom/pull/93/commits/051374207ac976bf40077db08ac82c5c5948b088

The base constructor should also check:

  • Assert.Equal(dataSource.Id, dataSourceItem.DataSourceId);
  • Assert.Equal(expectedDSTitle, dataSourceItem.DataSource.Item);

var dataSourceItem = new MicrosoftSharePointDataSourceItem(title, dataSource);

// Assert
Assert.Equal(title, dataSourceItem.Title);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use Theory to increase the coverage of unit tests. For ex the commit: https://github.com/RevealBi/Reveal.Sdk.Dom/pull/93/commits/051374207ac976bf40077db08ac82c5c5948b088

The base constructor should also check:

  • Assert.Equal(dataSource.Id, dataSourceItem.DataSourceId);
  • Assert.Equal(expectedDSTitle, dataSourceItem.DataSource.Item);

{
// Arrange
var dataSource = new MicrosoftAnalysisServicesDataSource();
var port = 8123;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should Port be string for consitency in HostDataSource?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write unit tests for Microsoft data sources
4 participants