Skip to content

Commit

Permalink
update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ceo1647 committed Oct 16, 2024
1 parent 058f09b commit 7ce40b6
Show file tree
Hide file tree
Showing 10 changed files with 2,153 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,6 @@ data/dsl/*.java
# Nodejs / NPM
node_modules
package-lock.json

!tools/**
!tools/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Orc.Automation.Controls;
using Orc.Automation.Tests;

public abstract class StyledControlTestFacts<TControl> : ControlUiTestFactsBase<TControl>
public abstract class StyledControlTestFacts<TControl> : ControlUiTestsBase<TControl>
where TControl : System.Windows.FrameworkElement
{
protected override bool TryLoadControl(TestHostAutomationControl testHost, out string testedControlAutomationId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Reflection;
using NUnit.Framework;
using Database;
using Microsoft.Win32;
using Moq;
using Orc.Automation.Tests;
using NUnit.Framework;

[TestFixture]
public class SystemSqlDbDataSourceProviderTests
{
[TestCase<SystemSqlDbDataSourceProvider>("System.Data.SqlClient")]
[TestCase<MsSqlDbDataSourceProvider>("Microsoft.Data.SqlClient")]
[Orc.Automation.Tests.TestCase<SystemSqlDbDataSourceProvider>("System.Data.SqlClient")]
[Orc.Automation.Tests.TestCase<MsSqlDbDataSourceProvider>("Microsoft.Data.SqlClient")]
public void GetDataSources_Returns_Correct_Local_Server_List<T>(string providerName)
where T : MsSqlDbDataSourceProviderBase
{
Expand All @@ -35,10 +33,7 @@ public void GetDataSources_Returns_Correct_Local_Server_List<T>(string providerN
{
if (Equals(x, "InstalledInstances"))
{
return new List<string>
{
serverName
};
return new List<string> { serverName };
}

return null;
Expand All @@ -60,17 +55,17 @@ public void GetDataSources_Returns_Correct_Local_Server_List<T>(string providerN
{
return null;
}

return registerKey.Object;
});

var dbProvider = (T) Activator.CreateInstance(typeof(T), BindingFlags.NonPublic | BindingFlags.Instance,
(Binder?) null, new object?[] {registerKeyService.Object}, (CultureInfo?)null);
var dbProvider = (T)Activator.CreateInstance(typeof(T), BindingFlags.NonPublic | BindingFlags.Instance,
null, new object?[] { registerKeyService.Object }, null);

var expectedServerName = $"{Environment.MachineName}\\{serverName}";

var sources = dbProvider.GetDataSources();

Assert.That(sources, Is.EquivalentTo(new []{ new DbDataSource(providerName, expectedServerName) }));
Assert.That(sources, Is.EquivalentTo(new[] { new DbDataSource(providerName, expectedServerName) }));
}
}
Loading

0 comments on commit 7ce40b6

Please sign in to comment.