Skip to content

Commit

Permalink
Unit test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
muratcakir committed Jun 22, 2017
1 parent 444fdb4 commit 0535a4e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Libraries/SmartStore.Core/Data/DataSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public virtual bool Load()
this.TenantName = curTenant;
this.TenantPath = tenantPath;

if (File.Exists(filePath))
if (File.Exists(filePath) && !s_TestMode)
{
string text = File.ReadAllText(filePath);
var settings = ParseSettings(text);
Expand Down
1 change: 1 addition & 0 deletions src/Libraries/SmartStore.Core/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
[assembly: InternalsVisibleTo("SmartStore.Core.Tests")]
[assembly: InternalsVisibleTo("SmartStore.Services.Tests")]
[assembly: InternalsVisibleTo("SmartStore.Web.Mvc.Tests")]
[assembly: InternalsVisibleTo("SmartStore.Data.Tests")]
4 changes: 0 additions & 4 deletions src/Libraries/SmartStore.Core/Utilities/ObjectDumper.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace SmartStore.Core.Utilities
Expand Down
2 changes: 0 additions & 2 deletions src/Libraries/SmartStore.Data/SmartDbConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
using SmartStore.Core.Infrastructure;
using SmartStore.Data.Caching;
using System.Web.Hosting;
using SmartStore.Utilities;
using System.Data.Entity.Migrations;

namespace SmartStore.Data
{
Expand Down
6 changes: 2 additions & 4 deletions src/Tests/SmartStore.Data.Tests/GlobalSetup.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using NUnit.Framework;
using SmartStore.Data.Migrations;
using SmartStore.Core.Data;

namespace SmartStore.Data.Tests
{
Expand All @@ -14,6 +11,7 @@ public class GlobalSetup
[SetUp]
public void SetUp()
{
DataSettings.SetTestMode(true);
var ctx = new SmartObjectContext(GetTestDbName());
Database.SetInitializer(new DropCreateDatabaseAlways<SmartObjectContext>());
ctx.Database.Initialize(true);
Expand Down

0 comments on commit 0535a4e

Please sign in to comment.