Fix Scene tests to work in VS IDE

This commit is contained in:
John Lewin 2017-07-12 13:37:26 -07:00
parent 8228ab9f3a
commit fbce1c9a50

View file

@ -27,30 +27,24 @@ of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
*/
using MatterHackers.Agg.PlatformAbstract;
using MatterHackers.DataConverters3D;
using MatterHackers.MatterControl.PartPreviewWindow;
using MatterHackers.MeshVisualizer;
using MatterHackers.PolygonMesh.Csg;
using MatterHackers.VectorMath;
using Newtonsoft.Json;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using MatterHackers.MatterControl.Tests.Automation;
using MatterHackers.Agg;
using MatterHackers.MatterControl.SlicerConfiguration;
using MatterHackers.Agg.PlatformAbstract;
using MatterHackers.DataConverters3D;
using MatterHackers.MatterControl.PartPreviewWindow;
using MatterHackers.MatterControl.Tests.Automation;
using MatterHackers.MeshVisualizer;
using MatterHackers.VectorMath;
using Newtonsoft.Json;
using NUnit.Framework;
namespace MatterHackers.PolygonMesh.UnitTests
{
[TestFixture, Category("Agg.PolygonMesh")]
public class SceneTests
{
static string matterControlPath = Path.GetFullPath(Path.Combine("..", "..", "..", "..", "..", "MatterControl"));
[Test]
public void SaveSimpleScene()
{
@ -103,8 +97,6 @@ namespace MatterHackers.PolygonMesh.UnitTests
public async Task ResavedSceneRemainsConsistent()
{
#if !__ANDROID__
string staticDataPathOverride = Path.Combine(matterControlPath, "StaticData");
// Set the static data to point to the directory of MatterControl
StaticData.Instance = new FileSystemStaticData(TestContext.CurrentContext.ResolveProjectPath(4, "StaticData"));
MatterControlUtilities.OverrideAppDataLocation(TestContext.CurrentContext.ResolveProjectPath(4));
@ -170,8 +162,9 @@ namespace MatterHackers.PolygonMesh.UnitTests
public static string GetSceneTempPath()
{
string tempPath = Path.GetFullPath(Path.Combine(matterControlPath, "Tests", "temp", "scenetests"));
string tempPath = TestContext.CurrentContext.ResolveProjectPath(4, "Tests", "temp", "scenetests");
Directory.CreateDirectory(tempPath);
return tempPath;
}
}