Revert prior workaround, explicitly create DB in dependent tests
This commit is contained in:
parent
7872f70299
commit
3ec400ee23
3 changed files with 9 additions and 2 deletions
|
|
@ -79,8 +79,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
get
|
||||
{
|
||||
// Possible workaround for test environment - prevents initializing UserSettings.Instance if no DB exists
|
||||
string username = File.Exists(ApplicationDataStorage.ApplicationUserDataPath) ? UserSettings.Instance.get("ActiveUserName") : null;
|
||||
string username = UserSettings.Instance.get("ActiveUserName");
|
||||
return string.IsNullOrEmpty(username) ? GuestDBPath : Path.Combine(ProfilesPath, $"{username}{userDBExtension}");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using System.Globalization;
|
|||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using System.Collections.ObjectModel;
|
||||
using MatterHackers.Agg.PlatformAbstract;
|
||||
using MatterHackers.MatterControl.Tests.Automation;
|
||||
|
||||
namespace MatterControl.Tests.MatterControl
|
||||
{
|
||||
|
|
@ -23,6 +24,8 @@ namespace MatterControl.Tests.MatterControl
|
|||
|
||||
static ConfigIniTests()
|
||||
{
|
||||
MatterControlUtilities.OverrideAppDataLocation();
|
||||
|
||||
StaticData.Instance = new MatterHackers.Agg.FileSystemStaticData(Path.Combine(matterControlDirectory, "StaticData"));
|
||||
|
||||
allPrinters = (from printerFile in new DirectoryInfo(printerSettingsDirectory).GetFiles("*.printer", SearchOption.AllDirectories)
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@ namespace MatterControl.Tests.MatterControl
|
|||
[TestFixture]
|
||||
public class LevelingTests
|
||||
{
|
||||
static LevelingTests()
|
||||
{
|
||||
MatterControlUtilities.OverrideAppDataLocation();
|
||||
}
|
||||
|
||||
[Test, Category("Leveling")]
|
||||
public void Leveling7PointsNeverGetsTooHigh()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue