Commit Graph

154 Commits

Author SHA1 Message Date
Sebastiaan Janssen
ab9c9df7d6 Reverting last minute hacks around the pluginmanager and adding Shannon's fixes
from changeset 85f9e5879e60
2012-11-27 13:27:33 -01:00
Shannon Deminick
a9257ad366 Fixes #U4-1213, much better support for ignoring routes in route table. Fixes issue with LogHelper. Adds unit tests
for ignoring routes.
2012-11-19 19:56:52 +05:00
Shannon Deminick
48c45447e4 Fixes: #U4-1207, Enhancements to DynamicXml (legacy and new), now implements proper IEnumerable<T> interfaces.
Added DynamicInstanceHelper for any dynamic object that should find matches on methods, properties and
extension methods. Fixed ExtensionMethodFinder to find the Enumerable extensions (was previously set to IEnumerable which would
find nothing).
2012-11-18 10:28:53 +05:00
Shannon Deminick
93e2d8d822 added missing file for tests. 2012-11-18 02:49:55 +05:00
Shannon Deminick
3dd411f159 Working on #U4-1174, lots of updates/fixes to media in MVC regarding loading data from the examine cache to return media + lots of unit tests. 2012-11-15 21:46:54 +05:00
Shannon Deminick
8b141dc51a Working on #U4-1174, lots of updates/fixes to media in MVC + unit tests. 2012-11-15 20:11:10 +05:00
Shannon Deminick
a7a38478db Working on #U4-1174 - issue with TypedMedia in MVC, fixes a few things and ensures Children() works
as expected, adds unit tests.
2012-11-15 04:18:23 +05:00
Shannon Deminick
b2e004b825 renamed namespace in test proj 2012-11-15 02:04:46 +05:00
Shannon Deminick
0cd115c268 Fixees: #U4-1166, automatically adds parsable routes in the route table to the reserved paths
so you don't have to explicitly add reserved paths to Umbraco config that you are creating routes for.
2012-11-14 03:32:50 +05:00
Shannon Deminick
9e320700e2 Fixes: #U4-1178, adds another strongly typed overload to GetPropertyValue<T> and adds more unit tests. 2012-11-12 10:50:23 +05:00
Shannon Deminick
65e3b7f951 Merge 2012-11-12 08:24:36 +05:00
Shannon Deminick
156f145c69 Updated the build manager to find instances based on persisted cache of previous lookups but uses BuildManager to do so, after
some benchmark unit tests against loading a type from an assembly this is about 100% faster. Updated the UmbracoModule to write more diagnostics
for benchmark debugging. Have basically reduced the startup time to approx 50% of what it used to be based on the current
benchmarks run. Previously app startup on my machine was about 5 seconds, now after the first startup it is about 2.5 seconds.
2012-11-12 08:10:12 +05:00
Shannon Deminick
083bab0528 Added HashCodeCombiner and unit tests to support. Added ability to create a hashed file based on scanned assemblies in the
PluginManager and added a cached plugin xml file to the PluginManager. Now we don't actually scan any assemblies on app startup
during plugin finding if none of the DLLs have changed. Added trace statements to the UmbracoModule for better benchmarking for
how long a full request takes to load from start to finish.
2012-11-11 09:09:06 +05:00
leekelleher
a3895ab149 Added unit tests for PropertyEditorValueConverters. 2012-11-10 21:40:37 +00:00
leekelleher
6c1bf4b85f Added unit test for ObjectExtensions TryConvertTo<DateTime>.
Modified CustomBooleanTypeConverter to accept an empty string as a FALSE.
2012-11-10 14:09:27 +00:00
Shannon Deminick
36f367f9d6 Added a unit test to confirm any ctor of a custom typed file system 2012-11-07 09:40:33 +05:00
Shannon Deminick
67d9e578f5 Fixes: #U4-919, we will just use real classes for extension methods and all custom file systems like the MediaFileSystem must inherit from
FileSystemWrapper
2012-11-07 09:30:40 +05:00
Shannon Deminick
b9d53ceac8 Fixes more of U4-1140, ensure that only legacy objects are returned from the dynamic stuff in the razor macros. Adds unit test for it. 2012-11-07 03:49:32 +05:00
Shannon Deminick
fb0c9c3fbb Changed DynamicXml to public (somehow this wasn't checked in before) #U4-U4-1146
Added unit tests for DynamicXml.Find methods which are passing.
2012-11-06 08:32:21 +06:00
Shannon Deminick
a4a9b26d93 Committed first tests of strongly typed querying with strongly typed document types using what would be generated code and extension methods. 2012-11-04 09:24:24 +06:00
Shannon Deminick
07f8f79620 Fixes: #U4-1077, found an bug with both our code and Microsoft's code in that if you RemapPath with an incorrect URL which contains
2 '?' the internals of ASP.net actually force a secondary internal request which causes BeginRequest to fire but doesn't follow the normal
chain of the module. It was a bug with our code having two query strings, however its pretty strange behavior on their part!
Have removed UmbracoContext.ClientUrl since it is not necessary to have. Have renamed UmbracoContext.UmbracoUrl = CleanedUmbracoUrl and UmbracoContext.RequextUrl = OriginalRequestUrl
Have moved the route processing logic to a static method on PublishedContentRequest which auto assigns the request back to the UmbracoContext, plus this is a cleaner
way to do the processing, including allowing us to unit test this one aspect.
Lastly, we are now rewriting the path back to the original URL in the RenderRouteHandler so that in MVC controllers the HttpContext.Request actually
reflects the URL that the client requested, not the rewritten URL (we do this in webforms too)
2012-10-26 02:55:57 +05:00
Shannon Deminick
d4d4272b1b Moved RenderModel to Models namespace. Created new base UmbracoViewPage to use for umbraco partial views, etc... and renamed
RenderViewPage to UmbracoTemplatePage which now inherits from UmbracoViewPage. Added NiceUrl and NiceUrlWithDomain as extension
methods to IPublishedContent.
2012-10-24 09:59:23 +05:00
Shannon Deminick
e85f594b84 Fixed issue with trees not showing up for some packages, was issue with PluginManager caching between finding global types or finding types with specific attributes.
In this case, we were finding attributed trees only which was cached against the type of ITree, then we were looking for all ITrees but previously we cached finding ITrees
but the cache value was only the attributed ones.
Removed the caching of some plugin finding since they are only found once and there's no reason for the additional mem overhead.
2012-10-17 08:44:32 +05:00
Shannon Deminick
0e0c4fcb1f Fixed an issue with unit tests and not resetting settings. 2012-10-14 08:11:49 +05:00
Sebastiaan Janssen
093a33e495 Fixed last setup/teardown problem for SQLCE in the unit tests 2012-10-12 15:05:07 -02:00
Sebastiaan Janssen
7a4ccc825d Only reset the DataDirectory path after clearing the database, else it will
never clear as it can't find a database at path null
Updated PublishedContentTests with correct amount of expected results
2012-10-12 14:45:13 -02:00
Sebastiaan Janssen
1b71c66256 Corrected some of the counts in PluginManagerTests so we can see why they start
failing when they do start failing again (upon inspecton of the returned
collections the current counts seem to reflect reality)
2012-10-12 12:45:31 -02:00
Shannon Deminick
b6f7d99039 Fixed why all the unit tests were failing. Ported over a couple of unit tests from the legacy test project to see how
easy it would be and it looks pretty easy, just need the propery initialization data for the tests. Currently ported over the
Dictionary biz logic tests.... most fail but pretty sure it's due to init data.
2012-10-11 08:32:06 +05:00
Shannon Deminick
422a2a685c Fixes: U4-1015, U4-1014 2012-10-11 03:42:18 +05:00
Shannon Deminick
5fc3d8e248 Fixes threading issue with Dynamicexpression... would have caused some strange behavior in the past!
Fixes: U4-995 - most methods will now work in dynamic expressions
2012-10-08 00:09:44 +05:00
Shannon Deminick
5895858e6e Merge 2012-10-07 00:08:21 +05:00
Shannon Deminick
cd38123fbd Fixes issue with DynamicExpression and parsing to ensure that it is using generic types, not hard coded types.
Ensures unit tests passing for Where, Single, SingleOrDefault with filters with dynamics.
2012-10-07 00:07:51 +05:00
Shannon Deminick
842d7120e6 Obsoletes DynamicQueryable in MacroEngines lib, proxies all calls to new DynamicQueryable in Umbraco.Web.
Adds more support for NodeTypeAlias and DocumentTypeAlias param names for compatibility.
Adds IsDocumentType is-helper method.
Adds unit tests for complex Linq using a Typed IPublishedContent object.
Adds unit tests for complex Linq using dynamics.
Adds support for Single, SingleOrDefault, First, FirstOrDefault, Last, LastOrDefault to dynamics for both DynamicNode and DynamicPublishedContent + unit tests.
Adds support for 'Children' on DynamicNode to keep things consistent, no longer required to have to do 'ChildrenAsList'.
DynamicNode now implements INode... not sure why this wasn't like that before.
2012-10-06 23:41:42 +05:00
Stephan
079aae7e63 bugfix unit tests polluting each other - static settings issue 2012-10-05 08:23:43 -02:00
Sebastiaan Janssen
cf91933791 Add some dummy files to ensure (empty) directories in the test project get created 2012-10-04 15:15:23 -02:00
Sebastiaan Janssen
d10c3a960f Merge 2012-10-04 15:04:14 -02:00
Sebastiaan Janssen
4d6d89dbe7 Add Masterpages and Views folder in the unit tests to project so almost 250 more tests will run properly 2012-10-04 15:03:40 -02:00
Shannon Deminick
f8848086fd Adds support for legacy schema to the DefaultPublishedContentStore, adds unit tests to support this. 2012-10-04 21:37:11 +05:00
Shannon Deminick
8804d912f2 More unit tests written and passing. 2012-10-04 06:00:47 +05:00
Shannon Deminick
54e5140d6a Added more extension methods to our strongly typed IPublishedContent object and IEnumerable<IPublishedContent> to match all of the available methods
that are on the DynamicPublishedContent object. Added more unit tests for all of these classes.
Moved some of the Dynamic objects into the web project which simplifies things quite a bit as some of these classes require access to the biz logic layer.
Now we have intellisense for all of the nice magical methods that were on DynamicPublishedContent on our strongly typed object!
2012-10-04 03:26:56 +05:00
Shannon Deminick
c0102f1c71 Refactored the traversal, ishelper, etc... methods to be extension methods on IPublishedContent so now all of these methods are available on the Typed object not just the dynamic object which makes a whole lot more sense... and you can have intellisense.
Updated DynamicPublishedContent's methods to just proxy calls to the new extension methods so that all of the logic is contained in one place.
Added new GetRootDocuments to the IPublishedContentStore since we need this in order to get the root list of documents for many of these methods.
Fixed an issue with the DynamicNode to IPublishedContent converter.
Fixed many of the failing unit tests.
2012-10-04 01:31:08 +05:00
Shannon Deminick
ef5525e67f renamed DynamicDocumentList to DynamicPublishedContentList
simplified some of the DynamicPublishedContent methods to accept Func<IPublishedContent> instead of Func<DynamicPublishedContent>, made the IsHelper method private as this shouldn't be exposed.
renamed other objects starting with DynamicDocument to DynamicPublishedContent
2012-10-02 22:51:53 +05:00
Shannon Deminick
56c93891a8 Fixes the ClearDatabase call in SqlCEHelper... pretty flukey that unit tests were even working with this bug for so long.
Fixes the RenderRouteHandlerTests.
2012-10-02 02:33:19 +05:00
Shannon Deminick
73c79e8528 After talks with morten and stephane, this renames
IDocumentLookup -> IPublishedContentLookup
2012-10-02 01:43:05 +05:00
Shannon Deminick
827d4dd6c0 After talks with morten and stephane, this renames
DocumentRequestBuilder -> PublishedContentRequestBuilder
2012-10-02 01:41:54 +05:00
Shannon Deminick
ffd14c839b After talks with morten and stephane, this renames
DocumentRequest -> PublishedContentRequest
2012-10-02 01:40:19 +05:00
Shannon Deminick
053df24640 After talks with morten and stephane, this renames
IDocument -> IPublishedContent
DynamicDocument -> DynamicPublishedContent
2012-10-02 01:35:39 +05:00
Shannon Deminick
5c20f4f6ec Fixes: U4-U4-917
Fixes: U4-821
2012-10-01 23:04:57 +05:00
Stephan
eeb305c740 fix uQuery.GetNodeIdByUrl 2012-10-01 13:08:10 -02:00
Stephan
c19541cb11 handle routing cache corruption cases, more unit tests 2012-10-01 12:20:51 -02:00