File tree Expand file tree Collapse file tree 5 files changed +4
-11
lines changed
Tests/SmartStore.Data.Tests Expand file tree Collapse file tree 5 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ public virtual bool Load()
206206 this . TenantName = curTenant ;
207207 this . TenantPath = tenantPath ;
208208
209- if ( File . Exists ( filePath ) )
209+ if ( File . Exists ( filePath ) && ! s_TestMode )
210210 {
211211 string text = File . ReadAllText ( filePath ) ;
212212 var settings = ParseSettings ( text ) ;
Original file line number Diff line number Diff line change 55[ assembly: InternalsVisibleTo ( "SmartStore.Core.Tests" ) ]
66[ assembly: InternalsVisibleTo ( "SmartStore.Services.Tests" ) ]
77[ assembly: InternalsVisibleTo ( "SmartStore.Web.Mvc.Tests" ) ]
8+ [ assembly: InternalsVisibleTo ( "SmartStore.Data.Tests" ) ]
Original file line number Diff line number Diff line change 11using System ;
2- using System . Collections . Generic ;
32using System . Diagnostics ;
43using System . IO ;
5- using System . Linq ;
6- using System . Text ;
7- using System . Threading . Tasks ;
84using Newtonsoft . Json ;
95
106namespace SmartStore . Core . Utilities
Original file line number Diff line number Diff line change 66using SmartStore . Core . Infrastructure ;
77using SmartStore . Data . Caching ;
88using System . Web . Hosting ;
9- using SmartStore . Utilities ;
10- using System . Data . Entity . Migrations ;
119
1210namespace SmartStore . Data
1311{
Original file line number Diff line number Diff line change 11using System ;
2- using System . Collections . Generic ;
32using System . Data . Entity ;
4- using System . Linq ;
5- using System . Text ;
63using NUnit . Framework ;
7- using SmartStore . Data . Migrations ;
4+ using SmartStore . Core . Data ;
85
96namespace SmartStore . Data . Tests
107{
@@ -14,6 +11,7 @@ public class GlobalSetup
1411 [ SetUp ]
1512 public void SetUp ( )
1613 {
14+ DataSettings . SetTestMode ( true ) ;
1715 var ctx = new SmartObjectContext ( GetTestDbName ( ) ) ;
1816 Database . SetInitializer ( new DropCreateDatabaseAlways < SmartObjectContext > ( ) ) ;
1917 ctx . Database . Initialize ( true ) ;
You can’t perform that action at this time.
0 commit comments