Commit Graph

62 Commits

Author SHA1 Message Date
Shannon Deminick
47f6401fcd updates unit test to ensure UmbracoContext.Current is nulled, updates dispose on application context to
not dispose the database if it is not configured.
2013-04-15 21:36:24 +06:00
Stephan
70ad3edc1f Web.UmbracoContext - refactor constructor to use IPublishedCaches 2013-04-03 08:40:35 -02:00
Shannon Deminick
3b982b80f5 Fixes test issues, needed to disable application cache for these tests since the cache invalidation happens at the CacheRefresher level but for these
tests (any many other ones) we are not 'booting' umbraco with the Boot managers so the CacheRefreshers are not wired up to listen to events to clear
the cache. This puts us another step closer to having a proper global cache solution that will work for everything. At least now, all of the legacy
code is using the ApplicationCache which we can now control from a central location. Changed NiceUrlsProviderWithDomainsTests to only require a new db
schema per fixture.
2013-03-23 04:01:52 +06:00
Stephan
47474d31d6 Web.PublishedCache - rename LegacyXmlCache into XmlPublishedCache 2013-03-22 15:02:26 -01:00
Stephan
fcb8f0d417 Web.Routing - RoutesCache goes with PublishedCache 2013-03-20 16:01:49 -01:00
Stephan
73d77083ae Web.PublishedCache - bugfix & fix tests 2013-03-19 17:54:41 -01:00
Stephan
b2a1f67fb4 Web.PublishedCache - move XML away from UmbracoContext 2013-03-19 17:54:41 -01:00
Stephan
cce32f406f Web.PublishedCache - move caches to UmbracoContext 2013-03-19 17:50:36 -01:00
Shannon Deminick
2b750843c5 Fixed up base web test, removes RequiresDbSetup in place of new database behavior - NoDatabasePerFixture.
Fixed issue with another test... no idea how it didn't show up failing before.
Fixes issue with string extensions and an infinite loop when the string to strip is empty/null.
2013-03-15 11:28:05 +06:00
Shannon Deminick
33c5c41a31 Added better support for clearing the db schema for test. Added more support for different db behaviors for tests, now to update
the behaviors where necessary as this will speed things up quite a lot.
2013-03-14 02:43:17 +04:00
Shannon Deminick
8d3c798c6c Changed tests to clear out the current database instead of trying to delete/re-create it. Fixes up
other test inconsistencies and more error checking on the ApplicationContext.Dispose.
2013-03-14 01:07:54 +04:00
Shannon Deminick
50b05d25f5 Added BaseUmbracoApplicationTests and fixed up dispose on the ApplicationContext to ensure the db object is disposed and doesn't
reset the PluginManager (as this shouldn't really need to be done). Cleaned up all unit tests so they follow the same structure and
uses this base class where necessary and eliminates a lot of duplicate code.
2013-03-13 18:31:07 +04:00
Shannon Deminick
75d218d2e3 Updated how mappers for persistence work with the MapperFor attribute and have made BaseMapper public but have
kept all properties, etc.. internal just so that they can be found so we don't have to register them.
Updates unit test to ensure the plugin manager is init'd properly with the 'false' override. Ensures that the base
db test also initializes the plugin manager properly.
2013-03-13 01:09:29 +04:00
Shannon Deminick
4baecfe833 Merge with 6.0.3 2013-03-11 21:56:47 +06:00
Morten Christensen
928d92fce4 Making the Sql Syntax Providers public and changing a few names and bits for consistency.
Adding resolver for the syntax providers and wiring it up in the boot manager.
2013-03-09 10:43:34 -01:00
Shannon Deminick
f79d046a87 Merge with 6.0.3 2013-03-05 22:19:31 +06:00
Shannon Deminick
a8936de638 Fixes: #U4-1834 2013-03-05 21:52:22 +06:00
Shannon Deminick
62ed7e0a53 Merge with 6.0.1 2013-02-21 22:48:45 +06:00
Shannon Deminick
635b8bd82e Removes all need of UmbracoSettings.UseLegacyXmlSchema = false; in unit tests since the default is false. 2013-02-21 22:46:50 +06:00
Shannon Deminick
e084ddeb41 Fixed up some merge issues. 2013-02-21 06:14:01 +06:00
Shannon Deminick
f8760b34b8 Merge with 6.0.1 2013-02-21 06:10:25 +06:00
Shannon Deminick
879c77c68d Applies same try/catch logic for setup/teardown because I'm still experiencing issues with the SQLCE
db file being locked which mucks up the rest of the setup/teardowns and tests fail.
2013-02-20 07:07:57 +06:00
Shannon Deminick
597c888d36 Merge 2013-02-20 06:36:21 +06:00
Shannon Deminick
694d252ce5 Fixed base test classes to ensure that if/when an issue goes wrong removing the database file that the class can
continue to TearDown (or force a teardown if it is starting up)
2013-02-20 05:54:41 +06:00
Shannon Deminick
b47f9e87f1 Fixed up merging and unit test structures so taht BaseWebTest uses BaseDatabaseFactoryTests.
Fixed up Examine unit test issues
2013-02-20 02:50:08 +06:00
Shannon Deminick
dddc308167 Merge with 6.0.1 2013-02-20 00:44:04 +06:00
Shannon Deminick
a2ea20de70 un-ignores PublishedMedia tests. Streamlines BaseWebTest so now we only have one place for database init logic (will
enhance this more today). Changed ExamineEvents to not delete indexes on trashed and changed PublishedMediaStore to ignore
nodes in the recycle bin path... and now to write unit tests for that.
2013-02-19 22:46:44 +06:00
Shannon Deminick
3b25214433 Adds new database table + migration + unit test + fixes up unit tests to ensure PluginManager.Current = null; is done on teardown.
Created new ServerRegistrationRepository + unit tests + models
2013-02-13 03:29:32 +06:00
Shannon Deminick
81f7754a45 Merge with 6.0.1 2013-02-11 04:18:33 +06:00
Morten Christensen
83518de981 Adding no guard for testing purposes 2013-02-08 11:37:50 -01:00
Stephan
56281d64b0 Tests.Routing - fix tests that were failing
due to Models.ITemplate, Resolution, database constraints...
2013-01-30 14:46:38 -01:00
Shannon Deminick
b080ebf697 Fixes failing unit tests due to not resetting Resolution before resetting the actual resolver classes. Now it is automatically impllied that
when you Reset a resolver class, Resolution is un-frozen.
2013-02-05 03:10:01 +06:00
Stephan
a94f3b6211 Web - RoutesCache belongs to RoutingContext 2013-01-30 14:45:13 -01:00
Stephan
6146a0576c Core.ObjectsResolution - add unit tests, fix some bugs 2013-01-23 09:41:01 -01:00
Stephan
01b4e8d59c Core.ObjectsResolution - refactor, cleanup, sanitize, ensure we properly freeze 2013-01-16 13:31:04 -01:00
Morten Christensen
0312caa166 Ensuring closed connections in unit tests using either the legacy or PetaPoco datalayer. 2013-01-02 10:44:28 -01:00
Sebastiaan Janssen
1e961860c3 U4-1376 Use the umbracoDbDsn everywhere 2012-12-31 14:52:49 -01:00
Morten Christensen
e4e5982349 Removing sql server/ce specific brackets from repository queries as it was causing problems with MySql.
Fixes regression bug from removing brackets from PrimaryKey columns. Columns are now passed and syntax specific brackets are added.
Moving the MySql special case for updating User Id from one to zero.
2012-12-27 19:53:01 -01:00
Shannon Deminick
b73efd16dc Fixes ServiceContext to ensure the repo's are lazy instantiated because their ctor's rely on the
RepositoryResolver.Current being initialized which normally doesn't occur until after the ServiceContext
is constructed. Adds instance level caching for the GetRecursiveValue method in case this is called more than
one time for a property in one view. Reverts PetaPocoUnitOfWork to allow more than one call to Commit().. this
isn't 'best practices' per se but it is more for performance reasons because otherwise we'd have to create a new
repo object + uow for any bulk saving operations... The end result is the same, bulk operations in the Services
cannot be processed in one transaction. Fixing up the ContentServiceTests by ensuring that the shared and always open sqlce
connection with the legacy SqlCeContextGuardian is closed on TearDown.
2012-12-15 10:33:29 +05:00
Morten Christensen
3d68106f47 Correcting a few unit tests that needed to have the ApplicationContext set in the SetUp of the fixture. 2012-12-14 13:49:20 -01:00
Shannon Deminick
a9cb337a96 Changes ApplicationContext to expect arguments of DatabaseContext and ServiceContext for it to be
constructed. Changes DatabaseContext to not be a singleton. Changes ServiceContext not to be a singleton.
Removed ServicesFactory. Updated unit tests to support new changes.
2012-12-14 08:06:32 +05:00
Shannon Deminick
feff68ada8 Refactor new Services for thread safety, plus unit tests. Not all services are updated to be correct, only the
ContentService, the rest need to be updated as well.
2012-12-11 12:03:36 +05:00
Morten Christensen
4f5c5cfc7c Making minor correct to ServiceContext as per Shannons recommendation.
Adding resolver reset to publishing test tear down.
2012-12-10 08:44:17 -01:00
Shannon Deminick
c9f40a74de Changed all data services to create one repository type in the constructor instead of resolving
them in each method since they are only supposed to be using their single unit of work anyways (resolving
will return the same repository anyways, but in some cases it might have been with a different UOW)
Removed SetUnitOfWork method on IRepository as this is not needed.
Removed the old implementation of RepositoryResolver and replaces it with the RepositoryInstanceResolver (but
maintained the name of RepositoryResolver)
2012-12-10 02:58:23 +05:00
Shannon Deminick
e0a7be7237 Created RepositoryInstanceResolver/Factory to replace the configuration based instantiation of Repo's.
Added unit tests to support resoling each instance, fixed CodeFirstTests to ensure that the base.TearDown() method is
called. Changed the BaseMapper's to internal.
2012-12-09 09:01:00 +05:00
Morten Christensen
357a5d1638 Merge 2012-11-29 12:41:36 -01:00
Morten Christensen
acb909c706 Refactoring installer to use the DatabaseContext for installing the umbraco db schema and default data.
Minimizing the use of the json/ajax calls during installation.
2012-11-29 12:40:48 -01:00
Sebastiaan Janssen
c6c5839373 Move directory creation to TestHelper and reference from a few places 2012-11-29 09:07:14 -01:00
Morten Christensen
52d65106f5 Correcting issues after running unit tests 2012-11-14 13:27:34 -01:00
Morten Christensen
a4d4411cca Moving services from Web proj to Core proj. 2012-11-12 07:40:11 -01:00