Commit Graph

94 Commits

Author SHA1 Message Date
Shannon Deminick
db79b95d22 Fixes a bunch more unit tests due to resolution issues. 2013-02-05 05:08:43 +06: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
Shannon Deminick
6b3de00e08 Merge with 6.0.1 2013-02-01 06:52:27 +06:00
Sebastiaan Janssen
6e0af6827e Fix weird merge issues 2013-01-31 14:35:18 -01:00
Sebastiaan Janssen
51ff861e44 Merge with 6.0.0 2013-01-31 14:09:24 -01:00
Morten Christensen
b20bb7a5a2 Fixes unit tests using the ContentService.Save method. Because we are using .ToXml in the save method to save preview xml we need to setup the DataTypesResolver in the test setup. 2013-01-30 16:23:33 -01:00
Morten Christensen
0c19307fa3 Making a few optimizations based on the findings in v.4.11.4. 2013-01-30 12:11:10 -01:00
Shannon Deminick
c9d55a4a5e Merge with 6.0.0 - Ensures 6.1 is in sync with 6.0 too 2013-01-29 10:15:49 +06:00
Stephan
09c19512d9 fix build 2013-01-27 13:32:04 -01:00
Morten Christensen
7aabf459ea Adding schema validation to the DatabaseSchemaCreation class.
Helps determine if valid database exists and which version it corresponds to.
On startup the legacy connectionstring is used if one exists, so its not ignore but rather reconfigured.
Relates to U4-1520.
2013-01-25 15:05:42 -01:00
Morten Christensen
23141e1e8c Fixing broken media tests after having added ToXml and saving of xml to ContentXml table in the MediaService 2013-01-24 12:25:48 -01:00
Stephan
6146a0576c Core.ObjectsResolution - add unit tests, fix some bugs 2013-01-23 09:41:01 -01:00
Sebastiaan Janssen
f947d05582 Use the NUnit workaround, like for v4 and ignore test that have been failing for
a long time now
2013-01-16 17:11:13 -01:00
Stephan
01b4e8d59c Core.ObjectsResolution - refactor, cleanup, sanitize, ensure we properly freeze 2013-01-16 13:31:04 -01:00
Morten Christensen
ef9b0b6433 Fixes U4-1429 - A name is now required for creating Content and Media. 2013-01-15 10:12:23 -01:00
Shannon Deminick
d0cccb5be6 Adds some more error checking to PhysicalFileSystem ctor. Fixing issues with Script/Style repo tests. 2013-01-15 01:15:08 +03:00
Shannon Deminick
98a171266e Fixes PhysicalFileSystem to use IOHelper instead of HostingEnvironment. Removes all references to new IFileSystem's that canont be supported currently, leaving only the media file system.
Updates all code to use PhysicalFileSystem in place of what 'could' eventually be an abstracted IFileSystem. Updates unit tests
accordingly.
2013-01-14 03:04:09 +03:00
Morten Christensen
9c792a7a5e Fixes U4-1423 so PropertyTypes not in a group are also included in the list of a Content/MediaTypes PropertyTypes. 2013-01-09 18:48:44 -01:00
Morten Christensen
87017d75be Adding sorting to other usages of PetaPoco relators.
Fixing Mapper test after having renamed a few properties yesterday.
2013-01-09 10:11:23 -01:00
Morten Christensen
c6feb2a27a Correcting an issue in the ContentTypeBaseRepository where removing a PropertyType would cause an error if a Property was referencing that PropertyType.
Correcting an issue in the ContentRepository that would occur if a new PropertyType had been added after Content is being used.
Fixes U4-1402
2013-01-08 09:49:13 -01:00
Morten Christensen
7e060d665b Renamed a few properties on the PropertyType object, as the original naming was confusing. 2013-01-08 07:38:54 -01:00
Morten Christensen
f534a671df Refactoring MediaTypeRepository to use strongly typed query for generating sql. 2013-01-04 10:48:49 -01:00
Morten Christensen
46fb8fca81 Refactoring ContentTypeRepository, MediaRepository and DataTypeDefinitionRepository to use strongly typed queries for generating sql.
Adding a few unit tests to ensure the correctness of the generated sql.
2013-01-04 10:42:29 -01:00
Morten Christensen
73530b10ae Refactoring ContentRepository to use strongly typed query for generating sql. 2013-01-04 09:23:20 -01:00
Sebastiaan Janssen
1e961860c3 U4-1376 Use the umbracoDbDsn everywhere 2012-12-31 14:52:49 -01:00
Morten Christensen
8999db6362 Refactoring ExpressionHelpers and querying to seperate the mapping used for our Database DTOs and Public Model.
Adding a MediaTypeMapper similar to the ContentTypeMapper, but type specific.
The PetaPoco IMapper implementation is removed as its no longer needed.
Updating a few unit tests, as the Where clause is now correctly formatted.
Adding unit tests for the new ExpressionHelper and MappingResolver classes.
2012-12-29 17:34:42 -01:00
Morten Christensen
56e2a89199 Adding a few new test cases to verify that AllowedChildContentTypes are saved correctly on ContentTypes and MediaTypes. 2012-12-29 11:11:09 -01:00
Sebastiaan Janssen
1e4361ed2f Merge with 6.0.0-LegacyApi-Refactor 2012-12-28 08:45:40 -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
Morten Christensen
64af0a610b Refactoring migrations by adding an abstract class to all expressions that allow for processing prior to returning an sql statement.
Refactoring the current sql syntax providers to better work with sql ce, sql server and mysql.
Adding migrations for v4.8 and v6.0.
Adding test cases for upgrading from 4.7 to 6.0 for the 3 database providers - sql ce, sql server and mysql.
Adding product name to the MigrationAttribute, which adds more flexibility to the MigrationRunner.
Fixing schema creation for mysql, which broke during a previous refactor task.
2012-12-27 18:52:47 -01:00
Morten Christensen
39e2314102 Correcting merge issues.
Fixing reset of published state in ContentRepository.
Correcting Querying tests after spacing has changed a bit.
2012-12-21 09:45:34 -01:00
Morten Christensen
2ea3fe624f Refactoring SqlSyntaProvider to use the new common definitions. 2012-12-19 15:23:05 -01:00
Morten Christensen
4d5d556e64 Refactoring ContentRepository and MediaRepository to have a common base for getting and deleting versions.
Adding VersionableRepositoryBase implementation.
2012-12-17 13:37:36 -01:00
Morten Christensen
f5bfb90b64 Manually merging a few changes to the ContentService, ContentFactory, ContentRepository and ContentExtensions to avoid a merge hell when pushing latest to the legacy refactor branch.
Current checkin has a few new failing tests due to recent changes, but a few should be resolved by adding a DataTypesResolver setup in the ContentServiceTests fixture.
2012-12-14 15:19:54 -01: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
Morten Christensen
877c38b8bc Moving RepositoryFactory to constructor to avoid hard dependency on the RepositoryResolver in the services. 2012-12-12 10:47:14 -01:00
Shannon Deminick
1e41db6d69 Removed any manual instantiation of PetaPocoUnitOfWork as this should generally always
be done by the PetaPocoUnitOfWorkProvider to ensure that for a UOW it always uses a new database
instance, not a shared one.
2012-12-12 06:08:03 +05:00
Shannon Deminick
6ac2db9497 removed database factory, changed audit trail stuff to internal, not sure it needs to be public. 2012-12-12 00:17:59 +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
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
f55d639514 Simplifies the ResolveByType so that it only requires the one interface, this is done by adding a new non-generic
IRepository interface.
2012-12-09 09:21:26 +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
a5344b4087 Ensure UmbracoSettings are reset between tests 2012-11-30 10:06:17 -01:00
Morten Christensen
2f83e5ba31 Fixing a few broken unit tests 2012-11-29 13:05:51 -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
Morten Christensen
7641bafd17 Refactoring installer 2012-11-26 17:58:42 -01:00
Morten Christensen
92913389b8 Fixing an issue I had introduced in ExpressionHelper 2012-11-26 14:13:50 -01:00
Morten Christensen
00f2458edd Adding a few unit tests to verify the outcome of the generated sql syntax for the Content- and ContentType repositories. 2012-11-26 12:28:59 -01:00
Morten Christensen
8ee0fffb84 Content repo sql tests 2012-11-26 11:29:20 -01:00