Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

checkpoint: changes for enabling FubuCore1

  • Loading branch information...
commit 0c138fd022af3f3ce67d23edcf45b8590086a0b4 1 parent 93e657c
Jeremy D. Miller jeremydmiller authored
Showing with 512 additions and 513 deletions.
  1. +2 −0  src/FubuKayak/packages.config
  2. +1 −1  src/FubuMVC.Core/AjaxExtensions.cs
  3. +1 −3 src/FubuMVC.Core/Assets/Http/AssetEtagInvocationFilter.cs
  4. +50 −33 src/FubuMVC.Core/Diagnostics/DebugReport.cs
  5. +1 −0  src/FubuMVC.Core/Diagnostics/DiagnosticsRegistry.cs
  6. +7 −6 src/FubuMVC.Core/FubuMVC.Core.csproj
  7. +4 −2 src/FubuMVC.Core/FubuRegistry.DefaultServices.cs
  8. +1 −1  src/FubuMVC.Core/Http/AspNet/ASPNetObjectConversionFamily.cs
  9. +57 −0 src/FubuMVC.Core/Http/AspNet/AspNetRequestData.cs
  10. +1 −1  src/FubuMVC.Core/Http/AspNet/AspNetServiceArguments.cs
  11. +40 −46 src/FubuMVC.Core/Http/AspNet/{AspNetAggregateDictionary.cs → RequestPropertyValueSource.cs}
  12. +3 −0  src/FubuMVC.Core/Http/IRequestHeaders.cs
  13. +19 −0 src/FubuMVC.Core/Http/RequestDataExtensions.cs
  14. +26 −15 src/FubuMVC.Core/Http/RequestHeaders.cs
  15. +13 −0 src/FubuMVC.Core/Http/RouteDataValues.cs
  16. +6 −13 src/FubuMVC.Core/Resources/PathBased/ResourcePathBinder.cs
  17. +4 −1 src/FubuMVC.Core/packages.config
  18. +1 −0  src/FubuMVC.Deployers/FubuMVC.Deployers.csproj
  19. +2 −2 src/FubuMVC.Deployers/packages.config
  20. +4 −0 src/FubuMVC.Diagnostics.Tests/FubuMVC.Diagnostics.Tests.csproj
  21. +6 −2 src/FubuMVC.Diagnostics.Tests/packages.config
  22. +1 −0  src/FubuMVC.Diagnostics/FubuMVC.Diagnostics.csproj
  23. +6 −2 src/FubuMVC.Diagnostics/packages.config
  24. +1 −0  src/FubuMVC.GettingStarted/FubuMVC.GettingStarted.csproj
  25. +4 −1 src/FubuMVC.GettingStarted/packages.config
  26. +1 −0  src/FubuMVC.HelloWorld/FubuMVC.HelloWorld.csproj
  27. +3 −1 src/FubuMVC.HelloWorld/packages.config
  28. +2 −1  src/FubuMVC.OwinHost.Testing/packages.config
  29. +3 −1 src/FubuMVC.OwinHost/FubuMVC.OwinHost.csproj
  30. +0 −66 src/FubuMVC.OwinHost/OwinAggregateDictionary.cs
  31. +21 −0 src/FubuMVC.OwinHost/OwinRequestData.cs
  32. +1 −1  src/FubuMVC.OwinHost/OwinServiceArguments.cs
  33. +2 −2 src/FubuMVC.OwinHost/packages.config
  34. +2 −0  src/FubuMVC.Spark.Tests/FubuMVC.Spark.Tests.csproj
  35. +4 −1 src/FubuMVC.Spark.Tests/packages.config
  36. +2 −0  src/FubuMVC.Spark/FubuMVC.Spark.csproj
  37. +3 −0  src/FubuMVC.Spark/packages.config
  38. +1 −0  src/FubuMVC.StructureMap/FubuMVC.StructureMap.csproj
  39. +4 −1 src/FubuMVC.StructureMap/packages.config
  40. +27 −8 src/FubuMVC.Tests/Assets/Http/AssetEtagInvocationFilterTester.cs
  41. +2 −1  src/FubuMVC.Tests/FubuMVC.Tests.csproj
  42. +8 −1 src/FubuMVC.Tests/Http/AspNet/AspNetModelBindingTester.cs
  43. +6 −2 src/FubuMVC.Tests/Http/AspNet/AspNetServiceArgumentsTester.cs
  44. +15 −11 src/FubuMVC.Tests/Http/RequestHeadersIntegratedTester.cs
  45. +55 −0 src/FubuMVC.Tests/Http/RouteDataValuesTester.cs
  46. +4 −4 src/FubuMVC.Tests/Registration/BehaviorGraphTester.cs
  47. +0 −6 src/FubuMVC.Tests/Registration/default_fubu_registry_service_registrations.cs
  48. +6 −16 src/FubuMVC.Tests/Resources/Etags/ModelBindingETaggedRequestTester.cs
  49. +16 −15 src/FubuMVC.Tests/Resources/PathBased/ResourcePathBinderTester.cs
  50. +0 −228 src/FubuMVC.Tests/Routing/AspNetAggregateDictionaryTester.cs
  51. +12 −9 src/FubuMVC.Tests/StructureMapIoC/StructureMapContainerFacilityTester.cs
  52. +2 −1  src/FubuMVC.Tests/packages.config
  53. +2 −0  src/FubuMVC.WebForms.Testing/FubuMVC.WebForms.Testing.csproj
  54. +2 −0  src/FubuMVC.WebForms.Testing/packages.config
  55. +2 −0  src/FubuMVC.WebForms/FubuMVC.WebForms.csproj
  56. +4 −1 src/FubuMVC.WebForms/packages.config
  57. +1 −0  src/FubuTestApplication/FubuTestApplication.csproj
  58. +3 −1 src/FubuTestApplication/packages.config
  59. +1 −0  src/KayakTestApplication/KayakTestApplication.csproj
  60. +2 −0  src/KayakTestApplication/packages.config
  61. +1 −0  src/QuickStart/QuickStart.csproj
  62. +4 −2 src/QuickStart/packages.config
  63. +2 −0  src/Serenity.Testing/Serenity.Testing.csproj
  64. +2 −0  src/Serenity.Testing/packages.config
  65. +2 −0  src/Serenity/Serenity.csproj
  66. +2 −0  src/Serenity/packages.config
  67. +2 −0  src/SerenityRunner/SerenityRunner.csproj
  68. +2 −0  src/SerenityRunner/packages.config
  69. +1 −1  src/StoryTellerTesting/packages.config
  70. +2 −0  src/TestPackage1/TestPackage1.csproj
  71. +2 −0  src/TestPackage1/packages.config
  72. +2 −0  src/TestPackage2/TestPackage2.csproj
  73. +4 −2 src/TestPackage2/packages.config
  74. +1 −0  src/TestPackage4/TestPackage4.csproj
  75. +3 −1 src/TestPackage4/packages.config
2  src/FubuKayak/packages.config
View
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
+
<package id="FubuCore" version="0.9.4.117" />
+
<package id="Gate" version="0.1.4" />
<package id="Gate.Kayak" version="0.1.4" />
<package id="HtmlTags" version="1.0.0.55" />
2  src/FubuMVC.Core/AjaxExtensions.cs
View
@@ -23,7 +23,7 @@ public static bool IsAjaxRequest(this IDictionary<string, object> requestInput)
public static bool IsAjaxRequest(this IRequestData requestInput)
{
bool result = false;
- requestInput.Value(XRequestedWithHeader, value => result = IsAjaxRequest(value));
+ requestInput.Value(XRequestedWithHeader, value => result = IsAjaxRequest(value.RawValue));
return result;
}
4 src/FubuMVC.Core/Assets/Http/AssetEtagInvocationFilter.cs
View
@@ -1,10 +1,8 @@
-using System;
using System.Net;
using FubuCore.Binding;
using FubuMVC.Core.Http;
using FubuMVC.Core.Resources.Etags;
using FubuMVC.Core.Runtime;
-using FubuCore;
namespace FubuMVC.Core.Assets.Http
{
@@ -21,7 +19,7 @@ public DoNext Filter(ServiceArguments arguments)
{
string etag = null;
- arguments.Get<AggregateDictionary>().Value(RequestDataSource.Header.ToString(), HttpRequestHeaders.IfNoneMatch, (key, value) => etag = (string) value);
+ arguments.Get<IRequestHeaders>().Value<string>(HttpRequestHeaders.IfNoneMatch, value => etag = value);
if (etag == null) return DoNext.Continue;
83 src/FubuMVC.Core/Diagnostics/DebugReport.cs
View
@@ -1,10 +1,10 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.Linq;
using System.Web;
using FubuCore.Binding;
+using FubuCore.Binding.InMemory;
+using FubuCore.Binding.Logging;
using FubuMVC.Core.Behaviors;
using FubuMVC.Core.Http;
@@ -16,21 +16,33 @@ public class BehaviorStep
public IBehaviorDetails Details { get; set; }
}
+ public class BindingHistory : IBindingHistory
+ {
+ private readonly DebugReport _report;
+
+ public BindingHistory(DebugReport report)
+ {
+ _report = report;
+ }
+
+ public void Store(BindingReport report)
+ {
+ // do nothing
+ }
+ }
+
public class DebugReport : TimedReport, IEnumerable<BehaviorReport>, IDebugReport
{
- private readonly AggregateDictionary _dictionary;
- private readonly ICurrentHttpRequest _request;
- private readonly IList<BehaviorReport> _behaviors = new List<BehaviorReport>();
private readonly Stack<BehaviorReport> _behaviorStack = new Stack<BehaviorReport>();
+ private readonly IList<BehaviorReport> _behaviors = new List<BehaviorReport>();
+ private readonly IRequestData _data;
+ private readonly ICurrentHttpRequest _request;
private readonly IList<BehaviorStep> _steps = new List<BehaviorStep>();
private ModelBindingReport _currentModelBinding;
- public Guid Id { get; private set; }
- public Guid BehaviorId { get; set; }
-
- public DebugReport(AggregateDictionary dictionary, ICurrentHttpRequest request)
+ public DebugReport(IRequestData data, ICurrentHttpRequest request)
{
- _dictionary = dictionary;
+ _data = data;
_request = request;
Id = Guid.NewGuid();
@@ -39,6 +51,9 @@ public DebugReport(AggregateDictionary dictionary, ICurrentHttpRequest request)
Time = DateTime.Now;
}
+ public Guid Id { get; private set; }
+ public Guid BehaviorId { get; set; }
+
public void RecordFormData()
{
@@ -71,11 +86,7 @@ public void RecordFormData()
public IEnumerable<BehaviorStep> Steps
{
- get { return _steps; } }
-
- public void AcceptVisitor(IBehaviorDetailsVisitor visitor)
- {
- throw new NotImplementedException();
+ get { return _steps; }
}
public BehaviorReport StartBehavior(IActionBehavior behavior)
@@ -84,16 +95,20 @@ public BehaviorReport StartBehavior(IActionBehavior behavior)
_behaviors.Add(report);
_behaviorStack.Push(report);
- AddDetails(new BehaviorStart { BehaviorType = behavior.GetType() });
+ AddDetails(new BehaviorStart{
+ BehaviorType = behavior.GetType()
+ });
return report;
}
public void EndBehavior()
{
- BehaviorReport report = _behaviorStack.Pop();
+ var report = _behaviorStack.Pop();
report.MarkFinished();
- addDetails(new BehaviorFinish { BehaviorType = report.BehaviorType }, report);
+ addDetails(new BehaviorFinish{
+ BehaviorType = report.BehaviorType
+ }, report);
}
public void AddDetails(IBehaviorDetails details)
@@ -104,21 +119,9 @@ public void AddDetails(IBehaviorDetails details)
addDetails(details, report);
}
- private void addDetails(IBehaviorDetails details, BehaviorReport report)
- {
- _steps.Add(new BehaviorStep
- {
- Behavior = report,
- Details = details
- });
-
- report.AddDetail(details);
- }
-
public void MarkException(Exception exception)
{
- var details = new ExceptionReport
- {
+ var details = new ExceptionReport{
Text = exception.ToString()
};
@@ -127,8 +130,7 @@ public void MarkException(Exception exception)
public void StartModelBinding(Type type)
{
- _currentModelBinding = new ModelBindingReport()
- {
+ _currentModelBinding = new ModelBindingReport{
BoundType = type
};
AddDetails(_currentModelBinding);
@@ -157,5 +159,20 @@ IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
+
+ public void AcceptVisitor(IBehaviorDetailsVisitor visitor)
+ {
+ throw new NotImplementedException();
+ }
+
+ private void addDetails(IBehaviorDetails details, BehaviorReport report)
+ {
+ _steps.Add(new BehaviorStep{
+ Behavior = report,
+ Details = details
+ });
+
+ report.AddDetail(details);
+ }
}
}
1  src/FubuMVC.Core/Diagnostics/DiagnosticsRegistry.cs
View
@@ -42,6 +42,7 @@ public DiagnosticsRegistry()
x.ReplaceService<IDebugDetector, DebugDetector>();
x.ReplaceService<IAuthorizationPolicyExecutor, RecordingAuthorizationPolicyExecutor>();
x.ReplaceService<IOutputWriter, RecordingOutputWriter>();
+ x.ReplaceService<IBindingHistory, BindingHistory>();
// TODO -- need to test this
13 src/FubuMVC.Core/FubuMVC.Core.csproj
View
@@ -42,6 +42,7 @@
</Reference>
<Reference Include="FubuCore">
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="FubuLocalization">
<HintPath>..\packages\FubuLocalization.0.9.4.116\lib\FubuLocalization.dll</HintPath>
@@ -52,9 +53,6 @@
<Reference Include="Ionic.Zip">
<HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath>
</Reference>
- <Reference Include="StructureMap">
- <HintPath>..\packages\structuremap.2.6.3\lib\StructureMap.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
@@ -200,9 +198,13 @@
<Compile Include="Caching\WriteStream.cs" />
<Compile Include="Caching\WriteTextOutput.cs" />
<Compile Include="Continuations\IRedirectable.cs" />
- <Compile Include="Diagnostics\Assets\BasicAssetDiagnostics.cs" />
+ <Compile Include="Diagnostics\Assets\BasicAssetDiagnostics.cs" />
<Compile Include="Http\CurrentRequestFullUrlPropertyBinder.cs" />
- <Compile Include="Http\CurrentRequestRelativeUrlPropertyBinder.cs" />
+ <Compile Include="Http\CurrentRequestRelativeUrlPropertyBinder.cs" />
+ <Compile Include="Http\AspNet\AspNetRequestData.cs" />
+ <Compile Include="Http\AspNet\RequestPropertyValueSource.cs" />
+ <Compile Include="Http\RequestDataExtensions.cs" />
+ <Compile Include="Http\RouteDataValues.cs" />
<Compile Include="Registration\ActionMethodFilter.cs" />
<Compile Include="Registration\ActionSource.cs" />
<Compile Include="Registration\Conventions\DictionaryOutputConvention.cs" />
@@ -235,7 +237,6 @@
<Compile Include="Runtime\IExceptionHandler.cs" />
<Compile Include="Runtime\IFubuRouteHandler.cs" />
<Compile Include="UI\HtmlConventionsActivator.cs" />
- <Compile Include="Http\AspNet\AspNetAggregateDictionary.cs" />
<Compile Include="Http\AspNet\AspNetHttpWriter.cs" />
<Compile Include="Http\AspNet\AspNetCurrentHttpRequest.cs" />
<Compile Include="Http\AspNet\ASPNetObjectConversionFamily.cs" />
6 src/FubuMVC.Core/FubuRegistry.DefaultServices.cs
View
@@ -133,9 +133,11 @@ public partial class FubuRegistry
private void setupServices(BehaviorGraph graph)
{
graph.Services.AddService<IConverterFamily, AspNetPassthroughConverter>();
-
+
graph.Services.SetServiceIfNone<ICurrentHttpRequest, StandInCurrentHttpRequest>();
- graph.Services.AddService<AggregateDictionary, AggregateDictionary>();
+
+ graph.Services.AddService<ICurrentHttpRequest, StandInCurrentHttpRequest>();
+ graph.Services.AddService<IRequestData>(new RequestData());
graph.Services.AddService<IModelBinder, FubuTupleBinder>();
graph.Services.AddService<IModelBinder>(new CurrentMimeTypeModelBinder());
2  src/FubuMVC.Core/Http/AspNet/ASPNetObjectConversionFamily.cs
View
@@ -7,7 +7,7 @@ public class AspNetObjectConversionFamily : StatelessConverter
{
public override bool Matches(PropertyInfo property)
{
- return AspNetAggregateDictionary.IsSystemProperty(property);
+ return RequestPropertyValueSource.IsSystemProperty(property);
}
public override object Convert(IPropertyContext context)
57 src/FubuMVC.Core/Http/AspNet/AspNetRequestData.cs
View
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Routing;
+using FubuCore.Binding;
+using FubuCore.Binding.Values;
+
+namespace FubuMVC.Core.Http.AspNet
+{
+ public class AspNetRequestData : RequestData
+ {
+ public AspNetRequestData(RequestContext context)
+ {
+ /*
+ * 1.) Route
+ * 2.) Request
+ * 3.) File
+ * 4.) Header
+ * 5.) RequestProperty
+ */
+
+ AddValues(new RouteDataValues(context.RouteData));
+
+ var request = context.HttpContext.Request;
+ addValues(RequestDataSource.Request, key => request[key], () => keysForRequest(request));
+
+ var files = request.Files;
+ addValues(RequestDataSource.File, key => files[key], () => files.AllKeys);
+
+ addValues(RequestDataSource.Header, key => request.Headers[key], () => request.Headers.AllKeys);
+
+ AddValues(new RequestPropertyValueSource(context.HttpContext.Request));
+
+
+ }
+
+ private void addValues(RequestDataSource source, Func<string, object> finder, Func<IEnumerable<string>> findKeys)
+ {
+ var valueSource = new GenericValueSource(source.ToString(), finder, findKeys);
+ AddValues(valueSource);
+ }
+
+ private static IEnumerable<string> keysForRequest(HttpRequestBase request)
+ {
+ foreach (var key in request.QueryString.AllKeys)
+ {
+ yield return key;
+ }
+
+ foreach (var key in request.Form.AllKeys.Where(x => x != null))
+ {
+ yield return key;
+ }
+ }
+ }
+}
2  src/FubuMVC.Core/Http/AspNet/AspNetServiceArguments.cs
View
@@ -8,7 +8,7 @@ public class AspNetServiceArguments : ServiceArguments
{
public AspNetServiceArguments(RequestContext requestContext)
{
- With<AggregateDictionary>(new AspNetAggregateDictionary(requestContext));
+ With<IRequestData>(new AspNetRequestData(requestContext));
With(requestContext.HttpContext);
With<ICurrentHttpRequest>(new AspNetCurrentHttpRequest(requestContext.HttpContext.Request));
86 ...MVC.Core/Http/AspNet/AspNetAggregateDictionary.cs → ...VC.Core/Http/AspNet/RequestPropertyValueSource.cs
View
@@ -4,21 +4,23 @@
using System.Linq.Expressions;
using System.Reflection;
using System.Web;
-using System.Web.Routing;
using FubuCore.Binding;
+using FubuCore.Binding.Values;
using FubuCore.Reflection;
using FubuCore.Util;
+using FubuCore;
namespace FubuMVC.Core.Http.AspNet
{
- public class AspNetAggregateDictionary : AggregateDictionary
+ public class RequestPropertyValueSource : IValueSource
{
private static readonly Cache<string, Func<HttpRequestBase, object>> _requestProperties =
new Cache<string, Func<HttpRequestBase, object>>();
private static readonly IList<PropertyInfo> _systemProperties = new List<PropertyInfo>();
+ private HttpRequestBase _request;
- static AspNetAggregateDictionary()
+ static RequestPropertyValueSource()
{
AddRequestProperty(r => r.AcceptTypes);
AddRequestProperty(r => r.ApplicationPath);
@@ -57,73 +59,62 @@ static AspNetAggregateDictionary()
AddRequestProperty(r => r.UserLanguages);
}
- private AspNetAggregateDictionary()
+ public static bool IsSystemProperty(PropertyInfo property)
{
+ return
+ _systemProperties.Any(
+ x => property.PropertyType.IsAssignableFrom(x.PropertyType) && x.Name == property.Name);
}
- public AspNetAggregateDictionary(RequestContext context)
+ public static void AddRequestProperty(Expression<Func<HttpRequestBase, object>> expression)
{
- Func<string, object> locator = key =>
- {
- object found;
- context.RouteData.Values.TryGetValue(key, out found);
- return found;
- };
-
-
- AddLocator(RequestDataSource.Route, locator, () => context.RouteData.Values.Keys);
-
- var @base = context.HttpContext;
+ var property = ReflectionHelper.GetProperty(expression);
+ _systemProperties.Add(property);
- configureForRequest(@base);
+ _requestProperties[property.Name] = expression.Compile();
}
- private void configureForRequest(HttpContextBase @base)
+ public RequestPropertyValueSource(HttpRequestBase request)
{
- var request = @base.Request;
+ _request = request;
+ }
- AddLocator(RequestDataSource.Request, key => request[key], () => keysForRequest(request));
+ //AddLocator(RequestDataSource.RequestProperty, key => GetRequestProperty(request, key),
+ // () => _requestProperties.GetAllKeys());
- AddLocator(RequestDataSource.File,
- key => request.Files[key],
- () => request.Files.AllKeys);
- AddLocator(RequestDataSource.Header, key => request.Headers[key], () => request.Headers.AllKeys);
- AddLocator(RequestDataSource.RequestProperty, key => GetRequestProperty(request, key),
- () => _requestProperties.GetAllKeys());
+ public bool Has(string key)
+ {
+ throw new NotImplementedException();
}
- public AggregateDictionary AddLocator(RequestDataSource source, Func<string, object> locator,
- Func<IEnumerable<string>> allKeys)
+ public object Get(string key)
{
- return AddLocator(source.ToString(), locator, allKeys);
+ throw new NotImplementedException();
}
- public static AspNetAggregateDictionary ForHttpContext(HttpContextWrapper context)
+ public bool HasChild(string key)
{
- var dict = new AspNetAggregateDictionary();
- dict.configureForRequest(context);
-
- return dict;
+ throw new NotImplementedException();
}
- public static bool IsSystemProperty(PropertyInfo property)
+ public IValueSource GetChild(string key)
{
- return
- _systemProperties.Any(
- x => property.PropertyType.IsAssignableFrom(x.PropertyType) && x.Name == property.Name);
+ throw new NotImplementedException();
}
- public static void AddRequestProperty(Expression<Func<HttpRequestBase, object>> expression)
+ public IEnumerable<IValueSource> GetChildren(string key)
{
- var property = ReflectionHelper.GetProperty(expression);
- _systemProperties.Add(property);
-
- _requestProperties[property.Name] = expression.Compile();
+ throw new NotImplementedException();
}
+ public void WriteReport(IValueReport report)
+ {
+ throw new NotImplementedException();
+ }
- private static IEnumerable<string> keysForRequest(HttpRequestBase request)
+ public bool Value(string key, Action<BindingValue> callback)
{
+
foreach (var key in request.QueryString.AllKeys.Where(x => x != null))
{
yield return key;
@@ -133,13 +124,16 @@ private static IEnumerable<string> keysForRequest(HttpRequestBase request)
{
yield return key;
}
- }
+ }
+ public string Provenance
+ {
+ get { throw new NotImplementedException(); }
+ }
private static object GetRequestProperty(HttpRequestBase request, string key)
{
return _requestProperties.Has(key) ? _requestProperties[key](request) : null;
}
}
-
}
3  src/FubuMVC.Core/Http/IRequestHeaders.cs
View
@@ -21,5 +21,8 @@ public interface IRequestHeaders
/// <typeparam name = "T"></typeparam>
/// <returns></returns>
T BindToHeaders<T>();
+
+
+ bool HasHeader(string header);
}
}
19 src/FubuMVC.Core/Http/RequestDataExtensions.cs
View
@@ -0,0 +1,19 @@
+using FubuCore.Binding;
+using FubuCore.Binding.Values;
+using FubuCore.Util;
+
+namespace FubuMVC.Core.Http
+{
+ public static class RequestDataExtensions
+ {
+ public static void AddValues(this IRequestData request, RequestDataSource source, IKeyValues values)
+ {
+ request.AddValues(source.ToString(), values);
+ }
+
+ public static IValueSource ValuesFor(this IRequestData request, RequestDataSource source)
+ {
+ return request.ValuesFor(source.ToString());
+ }
+ }
+}
41 src/FubuMVC.Core/Http/RequestHeaders.cs
View
@@ -1,46 +1,57 @@
using System;
using FubuCore.Binding;
+using FubuCore.Binding.Values;
using FubuCore.Conversion;
namespace FubuMVC.Core.Http
{
+
+
public class RequestHeaders : IRequestHeaders
{
private readonly IObjectConverter _converter;
- private readonly AggregateDictionary _dictionary;
private readonly IObjectResolver _resolver;
+ private readonly IValueSource _values;
- public RequestHeaders(IObjectConverter converter, IObjectResolver resolver, AggregateDictionary dictionary)
+ public RequestHeaders(IObjectConverter converter, IObjectResolver resolver, IRequestData requestData)
{
_converter = converter;
_resolver = resolver;
- _dictionary = dictionary;
+
+ _values = requestData.ValuesFor(RequestDataSource.Header);
}
public void Value<T>(string header, Action<T> callback)
{
- _dictionary.Value(RequestDataSource.Header.ToString(), header, (name, value) =>
+ _values.Value(header, value =>
{
- if (value == null)
- {
- callback(default(T));
- }
- else
- {
- var converted = _converter.FromString<T>(value.ToString());
- callback(converted);
- }
+ var converted = _converter.FromString<T>(value.RawValue.ToString());
+ callback(converted);
});
}
public T BindToHeaders<T>()
{
- var data = _dictionary.DataFor(RequestDataSource.Header.ToString());
- var bindResult = _resolver.BindModel(typeof (T), data);
+ var bindResult = _resolver.BindModel<T>(_values);
bindResult.AssertNoProblems(typeof (T));
return (T) bindResult.Value;
}
+
+ public bool HasHeader(string header)
+ {
+ return _values.Has(header);
+ }
+ }
+
+ // TODO -- move this to FubuCore
+ public static class ObjectResolverExtensions
+ {
+ public static BindResult BindModel<T>(this IObjectResolver resolver, IValueSource values)
+ {
+ var requestData = new RequestData(values);
+ return resolver.BindModel(typeof (T), requestData);
+ }
}
}
13 src/FubuMVC.Core/Http/RouteDataValues.cs
View
@@ -0,0 +1,13 @@
+using System.Web.Routing;
+using FubuCore.Binding.Values;
+
+namespace FubuMVC.Core.Http
+{
+ public class RouteDataValues : GenericValueSource
+ {
+ public RouteDataValues(RouteData data)
+ : base(RequestDataSource.Route.ToString(), key => data.Values[key], () => data.Values.Keys)
+ {
+ }
+ }
+}
19 src/FubuMVC.Core/Resources/PathBased/ResourcePathBinder.cs
View
@@ -8,13 +8,6 @@ namespace FubuMVC.Core.Resources.PathBased
{
public class ResourcePathBinder : IModelBinder
{
- private readonly IModelBinder _binder;
-
- public ResourcePathBinder(StandardModelBinder binder)
- {
- _binder = binder;
- }
-
public bool Matches(Type type)
{
return type.CanBeCastTo<ResourcePath>();
@@ -27,24 +20,24 @@ public void Bind(Type type, object instance, IBindingContext context)
public object Bind(Type type, IBindingContext context)
{
- var path = FindPath(context.Service<AggregateDictionary>());
+ var path = FindPath(context.Service<IRequestData>());
object instance = Activator.CreateInstance(type, path);
// Setting additional properties
-
- _binder.Bind(type, instance, context);
+ // TODO -- have this delegate to a new method on BindingContext instead
+ context.BindProperties(instance);
return instance;
}
- public static string FindPath(AggregateDictionary dictionary)
+ public static string FindPath(IRequestData dictionary)
{
- var routeData = dictionary.DataFor(RequestDataSource.Route.ToString());
+ var routeData = dictionary.ValuesFor(RequestDataSource.Route);
var list = new List<string>();
for (var i = 0; i < 10; i++)
{
- routeData.Value("Part" + i, o => list.Add(o.ToString()));
+ routeData.Value("Part" + i, o => list.Add(o.RawValue.ToString()));
}
return list.Join("/");
5 src/FubuMVC.Core/packages.config
View
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
+
<package id="Bottles" version="0.9.1.201" />
- <package id="Bottles.Deployment" version="0.9.1.201" />
+ <package id="Bottles.Deployment" version="0.9.1.201" />
+
<package id="DotNetZip" version="1.9.1.8" />
<package id="FubuCore" version="0.9.4.117" />
<package id="FubuLocalization" version="0.9.4.116" />
<package id="HtmlTags" version="1.0.0.55" />
+
<package id="structuremap" version="2.6.3" />
</packages>
1  src/FubuMVC.Deployers/FubuMVC.Deployers.csproj
View
@@ -42,6 +42,7 @@
</Reference>
<Reference Include="FubuCore">
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="HtmlTags">
<HintPath>..\packages\HtmlTags.1.0.0.55\lib\4.0\HtmlTags.dll</HintPath>
4 src/FubuMVC.Deployers/packages.config
View
@@ -3,8 +3,8 @@
<package id="Bottles" version="0.9.1.201" />
<package id="Bottles.Deployers.IIS" version="0.9.1.201" />
<package id="Bottles.Deployment" version="0.9.1.201" />
- <package id="DotNetZip" version="1.9.1.8" />
+ <package id="DotNetZip" version="1.9.1.8" />
<package id="FubuCore" version="0.9.4.117" />
- <package id="HtmlTags" version="1.0.0.55" />
+ <package id="HtmlTags" version="1.0.0.55" />
<package id="structuremap" version="2.6.3" />
</packages>
4 src/FubuMVC.Diagnostics.Tests/FubuMVC.Diagnostics.Tests.csproj
View
@@ -35,7 +35,11 @@
<HintPath>..\packages\Bottles.0.9.1.201\lib\Bottles.dll</HintPath>
</Reference>
<Reference Include="FubuCore">
+<<<<<<< HEAD
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+=======
+ <HintPath>..\packages\FubuCore.0.9.4.114\lib\FubuCore.dll</HintPath>
+>>>>>>> checkpoint: changes for enabling FubuCore1
</Reference>
<Reference Include="FubuTestingSupport">
<HintPath>..\packages\FubuTestingSupport.0.9.4.117\lib\FubuTestingSupport.dll</HintPath>
8 src/FubuMVC.Diagnostics.Tests/packages.config
View
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Bottles" version="0.9.1.201" />
+<packages>
+
+ <package id="Bottles" version="0.9.1.201" />
+
<package id="DotNetZip" version="1.9.1.8" />
+
<package id="FubuCore" version="0.9.4.117" />
<package id="FubuTestingSupport" version="0.9.4.117" />
<package id="HtmlTags" version="1.0.0.55" />
+
<package id="NUnit" version="2.5.10.11092" />
<package id="RhinoMocks" version="3.6" />
<package id="structuremap" version="2.6.3" />
1  src/FubuMVC.Diagnostics/FubuMVC.Diagnostics.csproj
View
@@ -38,6 +38,7 @@
</Reference>
<Reference Include="FubuCore">
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="HtmlTags">
<HintPath>..\packages\HtmlTags.1.0.0.55\lib\4.0\HtmlTags.dll</HintPath>
8 src/FubuMVC.Diagnostics/packages.config
View
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
-<packages>
+
+<packages>
+
<package id="Bottles" version="0.9.1.201" />
<package id="FubuCore" version="0.9.4.117" />
- <package id="HtmlTags" version="1.0.0.55" />
+ <package id="HtmlTags" version="1.0.0.55" />
+
+
<package id="Newtonsoft.Json" version="4.0.5" />
</packages>
1  src/FubuMVC.GettingStarted/FubuMVC.GettingStarted.csproj
View
@@ -32,6 +32,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
</Reference>
<Reference Include="HtmlTags">
5 src/FubuMVC.GettingStarted/packages.config
View
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
+
<package id="FubuCore" version="0.9.4.117" />
- <package id="HtmlTags" version="1.0.0.55" />
+ <package id="HtmlTags" version="1.0.0.55" />
+
+
</packages>
1  src/FubuMVC.HelloWorld/FubuMVC.HelloWorld.csproj
View
@@ -39,6 +39,7 @@
<HintPath>..\packages\Bottles.0.9.1.201\lib\Bottles.dll</HintPath>
</Reference>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
</Reference>
<Reference Include="HtmlTags">
4 src/FubuMVC.HelloWorld/packages.config
View
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
-<packages>
+
+<packages>
+
<package id="Bottles" version="0.9.1.201" />
<package id="FubuCore" version="0.9.4.117" />
<package id="HtmlTags" version="1.0.0.55" />
3  src/FubuMVC.OwinHost.Testing/packages.config
View
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FubuCore" version="0.9.4.117" />
- <package id="FubuTestingSupport" version="0.9.4.117" />
+ <package id="FubuTestingSupport" version="0.9.4.117" />
+
<package id="Gate" version="0.1.4" />
<package id="NUnit" version="2.5.10.11092" />
<package id="RhinoMocks" version="3.6" />
4 src/FubuMVC.OwinHost/FubuMVC.OwinHost.csproj
View
@@ -32,7 +32,9 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="Gate">
<HintPath>..\packages\Gate.0.1.4\lib\Gate.dll</HintPath>
@@ -56,11 +58,11 @@
<Compile Include="FormRequestReader.cs" />
<Compile Include="FubuOwinHost.cs" />
<Compile Include="IOwinRequestReader.cs" />
- <Compile Include="OwinAggregateDictionary.cs" />
<Compile Include="GateHttpContext.cs" />
<Compile Include="OwinCurrentHttpRequest.cs" />
<Compile Include="OwinHttpWriter.cs" />
<Compile Include="OwinRequestBody.cs" />
+ <Compile Include="OwinRequestData.cs" />
<Compile Include="OwinServiceArguments.cs" />
<Compile Include="OwinStreamingData.cs" />
<Compile Include="PortFinder.cs" />
66 src/FubuMVC.OwinHost/OwinAggregateDictionary.cs
View
@@ -1,66 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web.Routing;
-using FubuCore.Binding;
-using FubuMVC.Core.Http;
-
-namespace FubuMVC.OwinHost
-{
- // TODO -- this whole thing is duplication w/ AspNetAggregateDictionary. DRY it baby!
- public class OwinAggregateDictionary : AggregateDictionary
- {
- public OwinAggregateDictionary(RouteData routeData, OwinRequestBody body)
- {
- Func<string, object> locator = key =>
- {
- object found;
- routeData.Values.TryGetValue(key, out found);
- return found;
- };
-
- AddLocator(RequestDataSource.Route.ToString(), locator, () => routeData.Values.Keys);
- AddLocator(RequestDataSource.Request.ToString(), key => findRequestValue(key, body), () => valuesForRequest(body).Keys);
-
- addDictionaryLocator("Query string", body.Querystring());
- addDictionaryLocator("Form Post", body.FormData ?? new Dictionary<string, string>());
- addDictionaryLocator(RequestDataSource.Header.ToString(), body.Headers());
- }
-
- private void addDictionaryLocator(string name, IDictionary<string, string> dictionary)
- {
- Func<string, object> locator = key => dictionary.ContainsKey(key) ? dictionary[key] : null;
-
- AddLocator(name, locator, () => dictionary.Keys);
- }
-
- private static object findRequestValue(string key, OwinRequestBody body)
- {
- var values = valuesForRequest(body);
- string found;
- values.TryGetValue(key, out found);
- return found;
- }
-
- private static IDictionary<string, string> valuesForRequest(OwinRequestBody body)
- {
- var dictionary = new Dictionary<string, string>();
- var queryString = body.Querystring();
- foreach(var key in queryString.Keys)
- {
- dictionary.Add(key, queryString[key]);
- }
-
- IDictionary<string, string> formData = body.FormData ?? new Dictionary<string, string>();
- foreach (var key in formData.Keys.Where(x => x != null))
- {
- if(!dictionary.ContainsKey(key))
- {
- dictionary.Add(key, formData[key]);
- }
- }
-
- return dictionary;
- }
- }
-}
21 src/FubuMVC.OwinHost/OwinRequestData.cs
View
@@ -0,0 +1,21 @@
+using System.Collections.Generic;
+using System.Web.Routing;
+using FubuCore.Binding;
+using FubuCore.Util;
+using FubuMVC.Core.Http;
+
+namespace FubuMVC.OwinHost
+{
+ public class OwinRequestData : RequestData
+ {
+ public OwinRequestData(RouteData routeData, OwinRequestBody body)
+ {
+ AddValues(new RouteDataValues(routeData));
+
+ AddValues("OwinQuerystring", new DictionaryKeyValues(body.Querystring()));
+ AddValues("OwinFormPost", new DictionaryKeyValues(body.FormData ?? new Dictionary<string, string>()));
+
+ AddValues(RequestDataSource.Header.ToString(), new DictionaryKeyValues(body.Headers()));
+ }
+ }
+}
2  src/FubuMVC.OwinHost/OwinServiceArguments.cs
View
@@ -8,7 +8,7 @@ public class OwinServiceArguments : ServiceArguments
{
public OwinServiceArguments(RouteData routeData, OwinRequestBody body, Response response)
{
- With<AggregateDictionary>(new OwinAggregateDictionary(routeData, body));
+ With<IRequestData>(new OwinRequestData(routeData, body));
With<ICurrentHttpRequest>(new OwinCurrentHttpRequest(body));
With<IStreamingData>(new OwinStreamingData(body));
4 src/FubuMVC.OwinHost/packages.config
View
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="FubuCore" version="0.9.4.117" />
- <package id="Gate" version="0.1.4" />
+
+ <package id="FubuCore" version="0.9.4.117" /> <package id="Gate" version="0.1.4" />
</packages>
2  src/FubuMVC.Spark.Tests/FubuMVC.Spark.Tests.csproj
View
@@ -35,7 +35,9 @@
<HintPath>..\packages\Bottles.0.9.1.201\lib\Bottles.dll</HintPath>
</Reference>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="FubuLocalization">
<HintPath>..\packages\FubuLocalization.0.9.4.116\lib\FubuLocalization.dll</HintPath>
5 src/FubuMVC.Spark.Tests/packages.config
View
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
-<packages>
+
+<packages>
+
<package id="Bottles" version="0.9.1.201" />
<package id="FubuCore" version="0.9.4.117" />
<package id="FubuLocalization" version="0.9.4.116" />
<package id="FubuTestingSupport" version="0.9.4.117" />
<package id="HtmlTags" version="1.0.0.55" />
+
<package id="NUnit" version="2.5.10.11092" />
<package id="RhinoMocks" version="3.6" />
<package id="Spark" version="1.6" />
2  src/FubuMVC.Spark/FubuMVC.Spark.csproj
View
@@ -35,7 +35,9 @@
<HintPath>..\packages\Bottles.0.9.1.201\lib\Bottles.dll</HintPath>
</Reference>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="HtmlTags">
<HintPath>..\packages\HtmlTags.1.0.0.55\lib\4.0\HtmlTags.dll</HintPath>
3  src/FubuMVC.Spark/packages.config
View
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
+
<packages>
+
<package id="Bottles" version="0.9.1.201" />
<package id="FubuCore" version="0.9.4.117" />
<package id="HtmlTags" version="1.0.0.55" />
+
<package id="Spark" version="1.6" />
</packages>
1  src/FubuMVC.StructureMap/FubuMVC.StructureMap.csproj
View
@@ -39,6 +39,7 @@
<HintPath>..\packages\Bottles.0.9.1.201\lib\Bottles.dll</HintPath>
</Reference>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
</Reference>
<Reference Include="HtmlTags">
5 src/FubuMVC.StructureMap/packages.config
View
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
-<packages>
+
+<packages>
+
<package id="Bottles" version="0.9.1.201" />
<package id="FubuCore" version="0.9.4.117" />
<package id="HtmlTags" version="1.0.0.55" />
+
<package id="structuremap" version="2.6.3" />
</packages>
35 src/FubuMVC.Tests/Assets/Http/AssetEtagInvocationFilterTester.cs
View
@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.Net;
+using FubuCore;
using FubuCore.Binding;
+using FubuCore.Binding.Values;
using FubuMVC.Core;
using FubuMVC.Core.Assets.Http;
using FubuMVC.Core.Http;
@@ -12,12 +14,31 @@
namespace FubuMVC.Tests.Assets.Http
{
+ public class StubHeaders : IRequestHeaders
+ {
+ public KeyValues Data = new KeyValues();
+
+ public void Value<T>(string header, Action<T> callback)
+ {
+ Data.ForValue(header, (key, value) => callback(value.As<T>()));
+ }
+
+ public T BindToHeaders<T>()
+ {
+ throw new NotImplementedException();
+ }
+
+ public bool HasHeader(string header)
+ {
+ return Data.Has(header);
+ }
+ }
+
[TestFixture]
public class AssetEtagInvocationFilterTester
{
private ServiceArguments theServiceArguments;
- private AggregateDictionary theDictionary;
- private Dictionary<string, object> theHeaders;
+ private StubHeaders theHeaders;
private EtagCache theCache;
private AssetEtagInvocationFilter theFilter;
@@ -28,18 +49,16 @@ public class AssetEtagInvocationFilterTester
private void setRequestIfNoneMatch(string etag)
{
- theHeaders.Add(HttpRequestHeaders.IfNoneMatch, etag);
+ theHeaders.Data[HttpRequestHeaders.IfNoneMatch] = etag;
}
[SetUp]
public void SetUp()
{
theServiceArguments = new ServiceArguments();
- theDictionary = new AggregateDictionary();
- theHeaders = new Dictionary<string, object>();
- theDictionary.AddDictionary(RequestDataSource.Header.ToString(), theHeaders);
+ theHeaders = new StubHeaders();
- theServiceArguments.Set(typeof(AggregateDictionary), theDictionary);
+ theServiceArguments.Set(typeof(IRequestHeaders), theHeaders);
stash<IHttpWriter>();
stash<ICurrentChain>();
@@ -52,7 +71,7 @@ public void SetUp()
[Test]
public void returns_continue_if_there_is_no_if_none_match_header()
{
- theHeaders.ContainsKey(HttpRequestHeaders.IfNoneMatch).ShouldBeFalse();
+ theHeaders.HasHeader(HttpRequestHeaders.IfNoneMatch).ShouldBeFalse();
theFilter.Filter(theServiceArguments).ShouldEqual(DoNext.Continue);
}
3  src/FubuMVC.Tests/FubuMVC.Tests.csproj
View
@@ -44,6 +44,7 @@
</Reference>
<Reference Include="FubuCore">
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="FubuLocalization">
<HintPath>..\packages\FubuLocalization.0.9.4.116\lib\FubuLocalization.dll</HintPath>
@@ -201,6 +202,7 @@
<Compile Include="Http\MimeTypeListTester.cs" />
<Compile Include="Http\MimetypeRequestConditionalTester.cs" />
<Compile Include="Http\RequestHeadersIntegratedTester.cs" />
+ <Compile Include="Http\RouteDataValuesTester.cs" />
<Compile Include="Localization\LabelBuilderTester.cs" />
<Compile Include="Localization\LocalizationBootstrappingTester.cs" />
<Compile Include="Localization\RegisterXmlDirectoryLocalizationStorageTester.cs" />
@@ -464,7 +466,6 @@
<Compile Include="TestController.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
- <Compile Include="Routing\AspNetAggregateDictionaryTester.cs" />
<Compile Include="UI\Address.cs" />
<Compile Include="UI\DefaultElementNamingConventionTester.cs" />
<Compile Include="UI\DefaultHtmlConventionsTester.cs" />
9 src/FubuMVC.Tests/Http/AspNet/AspNetModelBindingTester.cs
View
@@ -1,9 +1,14 @@
+using System.Diagnostics;
using System.Web;
+using FubuCore;
using FubuCore.Binding;
using FubuCore.Reflection;
+using FubuMVC.Core;
using FubuMVC.StructureMap;
using FubuTestingSupport;
using NUnit.Framework;
+using System.Collections.Generic;
+using StructureMap;
namespace FubuMVC.Tests.Http.AspNet
{
@@ -15,7 +20,9 @@ public class AspNetModelBindingTester
[SetUp]
public void SetUp()
{
- registry = StructureMapContainerFacility.GetBasicFubuContainer().GetInstance<IValueConverterRegistry>();
+ var container = new Container();
+ FubuApplication.For(new FubuRegistry()).StructureMap(container).Bootstrap();
+ registry = container.GetInstance<BindingRegistry>();
}
[Test]
8 src/FubuMVC.Tests/Http/AspNet/AspNetServiceArgumentsTester.cs
View
@@ -15,6 +15,7 @@ public class AspNetServiceArgumentsTester
private HttpContextBase theHttpContext;
private RequestContext theRequestContext;
private AspNetServiceArguments theArguments;
+ private HttpRequestBase theHttpRequest;
[SetUp]
public void SetUp()
@@ -22,13 +23,16 @@ public void SetUp()
theHttpContext = MockRepository.GenerateMock<HttpContextBase>();
theRequestContext = new RequestContext(theHttpContext, new RouteData());
+ theHttpRequest = MockRepository.GenerateMock<HttpRequestBase>();
+ theHttpContext.Stub(x => x.Request).Return(theHttpRequest);
+
theArguments = new AspNetServiceArguments(theRequestContext);
}
[Test]
- public void should_have_an_aggregate_dictionary()
+ public void should_add_the_request_data()
{
- theArguments.Get<AggregateDictionary>().ShouldBeOfType<AspNetAggregateDictionary>();
+ theArguments.Get<IRequestData>().ShouldBeOfType<AspNetRequestData>();
}
[Test]
26 src/FubuMVC.Tests/Http/RequestHeadersIntegratedTester.cs
View
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using FubuCore.Binding;
+using FubuCore.Binding.Values;
using FubuMVC.Core.Http;
using FubuMVC.StructureMap;
using NUnit.Framework;
@@ -12,18 +13,20 @@ namespace FubuMVC.Tests.Http
[TestFixture]
public class RequestHeadersIntegratedTester
{
- private Dictionary<string, object> theHeaderDictionary;
+ private KeyValues theHeaderValues;
private RequestHeaders theHeaders;
+ private RequestData theRequest;
[SetUp]
public void SetUp()
{
var container = StructureMapContainerFacility.GetBasicFubuContainer();
- theHeaderDictionary = new Dictionary<string, object>();
- var dictionary = new AggregateDictionary();
- dictionary.AddDictionary(RequestDataSource.Header.ToString(), theHeaderDictionary);
+ theHeaderValues = new KeyValues();
- container.Inject(dictionary);
+ theRequest = new RequestData();
+ theRequest.AddValues(RequestDataSource.Header, theHeaderValues);
+
+ container.Inject<IRequestData>(theRequest);
theHeaders = container.GetInstance<RequestHeaders>();
}
@@ -31,7 +34,7 @@ public void SetUp()
[Test]
public void value_negative()
{
- theHeaderDictionary.ContainsKey(HttpRequestHeaders.IfNoneMatch).ShouldBeFalse();
+ theHeaderValues.Has(HttpRequestHeaders.IfNoneMatch).ShouldBeFalse();
var action = MockRepository.GenerateMock<Action<string>>();
theHeaders.Value(HttpRequestHeaders.IfNoneMatch, action);
@@ -43,7 +46,8 @@ public void value_negative()
[Test]
public void value_positive()
{
- theHeaderDictionary.Add(HttpRequestHeaders.IfNoneMatch, "12345");
+
+ theHeaderValues[HttpRequestHeaders.IfNoneMatch] = "12345";
var action = MockRepository.GenerateMock<Action<string>>();
theHeaders.Value(HttpRequestHeaders.IfNoneMatch, action);
@@ -54,7 +58,7 @@ public void value_positive()
[Test]
public void convert_to_something_besides_strings()
{
- theHeaderDictionary.Add(HttpRequestHeaders.IfNoneMatch, "12345");
+ theHeaderValues[HttpRequestHeaders.IfNoneMatch] = "12345";
var action = MockRepository.GenerateMock<Action<int>>();
theHeaders.Value<int>(HttpRequestHeaders.IfNoneMatch, action);
@@ -69,9 +73,9 @@ public void convert_to_something_besides_strings()
public void bind_an_object()
{
var modifiedSince = DateTime.Today.AddMinutes(-90);
- theHeaderDictionary.Add(HttpRequestHeaders.IfModifiedSince, modifiedSince.ToString());
- theHeaderDictionary.Add(HttpRequestHeaders.IfMatch, "12345");
- theHeaderDictionary.Add(HttpRequestHeaders.IfNoneMatch, "2345");
+ theHeaderValues[HttpRequestHeaders.IfModifiedSince] = modifiedSince.ToString();
+ theHeaderValues[HttpRequestHeaders.IfMatch] = "12345";
+ theHeaderValues[HttpRequestHeaders.IfNoneMatch] = "2345";
var dto = theHeaders.BindToHeaders<ETagDto>();
dto.IfModifiedSince.ShouldEqual(modifiedSince);
55 src/FubuMVC.Tests/Http/RouteDataValuesTester.cs
View
@@ -0,0 +1,55 @@
+using System.Web.Routing;
+using FubuCore.Binding.Values;
+using FubuMVC.Core.Http;
+using NUnit.Framework;
+using FubuTestingSupport;
+using Rhino.Mocks;
+
+namespace FubuMVC.Tests.Http
+{
+ [TestFixture]
+ public class RouteDataValuesTester
+ {
+ private RouteDataValues theValues;
+
+ [SetUp]
+ public void SetUp()
+ {
+ var data = new RouteData();
+ data.Values.Add("a", 1);
+ data.Values.Add("b", 2);
+
+ theValues = new RouteDataValues(data);
+ }
+
+ [Test]
+ public void got_the_provenance()
+ {
+ theValues.Provenance.ShouldEqual(RequestDataSource.Route.ToString());
+ }
+
+ [Test]
+ public void get_value()
+ {
+ theValues.Get("a").ShouldEqual(1);
+ }
+
+ [Test]
+ public void has()
+ {
+ theValues.Has("a").ShouldBeTrue();
+ theValues.Has("b").ShouldBeTrue();
+ theValues.Has("c").ShouldBeFalse();
+ }
+
+ [Test]
+ public void write_report()
+ {
+ var report = MockRepository.GenerateMock<IValueReport>();
+ theValues.WriteReport(report);
+
+ report.AssertWasCalled(x => x.Value("a", 1));
+ report.AssertWasCalled(x => x.Value("b", 2));
+ }
+ }
+}
8 src/FubuMVC.Tests/Registration/BehaviorGraphTester.cs
View
@@ -111,14 +111,14 @@ public class MyRequestModel {}
public void replace_service_by_specifying_a_value()
{
var graph = new BehaviorGraph(null);
- Assert.Fail("Use something else here");
- //var resolver = new RecordingObjectResolver(null, null);
+ var resolver = MockRepository.GenerateMock<IObjectResolver>();
- //graph.Services.ReplaceService<IObjectResolver>(resolver);
+ graph.Services.ReplaceService<IObjectResolver>(resolver);
- //graph.Services.DefaultServiceFor<IObjectResolver>().Value.ShouldBeTheSameAs(resolver);
+ graph.Services.DefaultServiceFor<IObjectResolver>().Value.ShouldBeTheSameAs(resolver);
}
+
[Test]
public void replace_service_by_specifying_types()
{
6 src/FubuMVC.Tests/Registration/default_fubu_registry_service_registrations.cs
View
@@ -85,12 +85,6 @@ public void IRequestDataProvider_is_registered()
}
[Test]
- public void IRequestData_is_registered()
- {
- registeredTypeIs<IRequestData, RequestData>();
- }
-
- [Test]
public void IRequestHeader_is_registered()
{
registeredTypeIs<IRequestHeaders, RequestHeaders>();
22 src/FubuMVC.Tests/Resources/Etags/ModelBindingETaggedRequestTester.cs
View
@@ -1,5 +1,6 @@
using FubuCore;
using FubuCore.Binding;
+using FubuCore.Binding.InMemory;
using FubuMVC.Core;
using FubuMVC.Core.Http;
using FubuMVC.Core.Resources.Etags;
@@ -22,24 +23,13 @@ public void SetUp()
var theHttpRequest = MockRepository.GenerateMock<ICurrentChain>();
theHttpRequest.Stub(x => x.ResourceHash()).Return("something/else");
- var locator = new StructureMapServiceLocator(new Container(x =>
- {
- x.For<ICurrentChain>().Use(theHttpRequest);
- }));
-
FubuApplication.SetupNamingStrategyForHttpHeaders();
- var data = new InMemoryRequestData();
- data["If-None-Match"] = "12345";
-
-
- Assert.Fail("Switch to BindingScenario");
-
- //var context = new BindingContext(data, locator, new NulloBindingLogger());
-
- //var binder = StandardModelBinder.Basic();
-
- //theEtagRequest = binder.Bind(typeof(ETaggedRequest), context).As<ETaggedRequest>();
+ theEtagRequest = BindingScenario<ETaggedRequest>.Build(x =>
+ {
+ x.Service<ICurrentChain>(theHttpRequest);
+ x.Data("If-None-Match", "12345");
+ });
}
31 src/FubuMVC.Tests/Resources/PathBased/ResourcePathBinderTester.cs
View
@@ -3,6 +3,8 @@
using System.Linq;
using FubuCore.Binding;
using FubuCore.Binding.InMemory;
+using FubuCore.Reflection;
+using FubuCore.Util;
using FubuMVC.Core;
using FubuMVC.Core.Http;
using FubuMVC.Core.Resources.PathBased;
@@ -16,30 +18,29 @@ namespace FubuMVC.Tests.Resources.PathBased
[TestFixture]
public class ResourcePathBinderTester
{
- private AggregateDictionary theAggregateDictionary;
- private Dictionary<string, object> theRouteValues;
+ private Dictionary<string, string> theRouteValues;
private StandardModelBinder theBinder;
+ private RequestData theRequestData;
[SetUp]
public void SetUp()
{
- Assert.Fail("Use the new BindingScenario stuff");
- //theBinder = StandardModelBinder.Basic().As<StandardModelBinder>();
+ theBinder = new StandardModelBinder(new BindingRegistry(), new TypeDescriptorCache());
- theAggregateDictionary = new AggregateDictionary();
+ theRequestData = new RequestData();
- var otherDictionary = new Dictionary<string, object>();
+ var otherDictionary = new Dictionary<string, string>();
for (int i = 0; i < 10; i++)
{
otherDictionary.Add("Part" + i, Guid.NewGuid().ToString());
}
- theAggregateDictionary.AddDictionary(RequestDataSource.Request.ToString(), otherDictionary);
+ theRequestData.AddValues(RequestDataSource.Request, new DictionaryKeyValues(otherDictionary));
- theRouteValues = new Dictionary<string, object>();
+ theRouteValues = new Dictionary<string, string>();
- theAggregateDictionary.AddDictionary(RequestDataSource.Route.ToString(), theRouteValues);
+ theRequestData.AddValues(RequestDataSource.Route.ToString(), new DictionaryKeyValues(theRouteValues));
}
@@ -47,10 +48,10 @@ public void SetUp()
private ResourcePath findPathByBinding()
{
var locator = new SelfMockingServiceLocator();
- locator.Stub(theAggregateDictionary);
- var context = new BindingContext(new RequestData(theAggregateDictionary), locator, new NulloBindingLogger());
+ locator.Stub<IRequestData>(theRequestData);
+ var context = new BindingContext(theRequestData, locator, new NulloBindingLogger());
- return (ResourcePath)new ResourcePathBinder(theBinder).Bind(typeof(ResourcePath), context);
+ return (ResourcePath)new ResourcePathBinder().Bind(typeof(ResourcePath), context);
}
[Test]
@@ -64,21 +65,21 @@ public void resource_binder_is_registered_by_default()
[Test]
public void matches_subclass_of_resource_path()
{
- new ResourcePathBinder(theBinder).Matches(typeof(SpecialPath))
+ new ResourcePathBinder().Matches(typeof(SpecialPath))
.ShouldBeTrue();
}
[Test]
public void matches_ResourcePath_itself()
{
- new ResourcePathBinder(theBinder).Matches(typeof(ResourcePath))
+ new ResourcePathBinder().Matches(typeof(ResourcePath))
.ShouldBeTrue();
}
[Test]
public void does_not_match_on_a_non_resource_path_class()
{
- new ResourcePathBinder(theBinder).Matches(GetType())
+ new ResourcePathBinder().Matches(GetType())
.ShouldBeFalse();
}
228 src/FubuMVC.Tests/Routing/AspNetAggregateDictionaryTester.cs
View
@@ -1,228 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.Linq.Expressions;
-using System.Web;
-using System.Web.Routing;
-using FubuCore.Binding;
-using FubuCore.Reflection;
-using FubuMVC.Core.Http;
-using FubuMVC.Core.Http.AspNet;
-using FubuTestingSupport;
-using NUnit.Framework;
-using Rhino.Mocks;
-
-namespace FubuMVC.Tests.Routing
-{
- [TestFixture]
- public class AspNetAggregateDictionaryTester
- {
- #region Setup/Teardown
-
- [SetUp]
- public void SetUp()
- {
- callback = MockRepository.GenerateMock<IDictionaryCallback>();
-
- dict1 = new Dictionary<string, object>
- {
- {"a", 1},
- {"b", 2},
- {"c", 3}
- };
-
- dict2 = new Dictionary<string, object>
- {
- {"d", 4},
- {"e", 5},
- {"f", 6}
- };
-
- dict3 = new Dictionary<string, object>
- {
- {"g", 7},
- {"h", 8},
- {"i", 9}
- };
-
- aggregate = new AggregateDictionary();
- aggregate.AddLocator(RequestDataSource.Route.ToString(), key => dict1.ContainsKey(key) ? dict1[key] : null, () => dict1.Keys);
- aggregate.AddLocator(RequestDataSource.Request.ToString(), key => dict2.ContainsKey(key) ? dict2[key] : null, () => dict2.Keys);
- aggregate.AddLocator(RequestDataSource.Header.ToString(), key => dict3.ContainsKey(key) ? dict3[key] : null, () => dict3.Keys);
- }
-
- #endregion
-
- private IDictionaryCallback callback;
- private Dictionary<string, object> dict1;
- private Dictionary<string, object> dict2;
- private Dictionary<string, object> dict3;
- private AggregateDictionary aggregate;
-
- [Test]
- public void has_prefixed_value_positive()
- {
- dict3.Add("SiteName", "a");
- aggregate.HasAnyValuePrefixedWith("Site").ShouldBeTrue();
-
- dict2.Add("AddressName", "b");
- aggregate.HasAnyValuePrefixedWith("Address").ShouldBeTrue();
-
- dict1.Add("CaseName", "c");
- aggregate.HasAnyValuePrefixedWith("Case").ShouldBeTrue();
- }
-
- [Test]
- public void has_prefixed_value_negative()
- {
- aggregate.HasAnyValuePrefixedWith("Site").ShouldBeFalse();
-
- aggregate.HasAnyValuePrefixedWith("Address").ShouldBeFalse();
-
- aggregate.HasAnyValuePrefixedWith("Case").ShouldBeFalse();
- }
-
- private void forKey(string key)
- {
- aggregate.Value(key, callback.Callback);
- }
-
- private void assertFound(RequestDataSource source, object value)
- {
- callback.AssertWasCalled(x => x.Callback(source.ToString(), value));
- }
-
- private void assertWasNotFound()
- {
- callback.AssertWasNotCalled(x => x.Callback("", ""), o => o.IgnoreArguments());
- }
-
- [Test]
- public void find_value_from_second_dictionary()
- {
- forKey("d");
- assertFound(RequestDataSource.Request, 4);
- }
-
- [Test]
- public void find_value_from_third_dictionary()
- {
- forKey("i");
- assertFound(RequestDataSource.Header, 9);
- }
-
- [Test]
- public void find_value_from_top_dictionary()
- {
- forKey("b");
- assertFound(RequestDataSource.Route, 2);
- }
-
- [Test]
- public void find_value_when_it_is_not_there()
- {
- forKey("abc");
-
- callback.AssertWasNotCalled(x => x.Callback(RequestDataSource.Route.ToString(), null), x => x.IgnoreArguments());
- }
-
- [Test]
- public void find_value_from_request_property()
- {
- const string expectedValue = "STUBBED USERAGENT";
- var requestCtx = Do_the_Stupid_ASPNET_Mock_HokeyPokey();
- requestCtx.HttpContext.Request.Stub(r => r.UserAgent).Return(expectedValue);
- aggregate = new AspNetAggregateDictionary(requestCtx);
-
- forKey("UserAgent");
-
- assertFound(RequestDataSource.RequestProperty, expectedValue);
- }
-
- [Test]
- public void should_never_find_uri_value_from_request_property()
- {
- var requestCtx = Do_the_Stupid_ASPNET_Mock_HokeyPokey();
- aggregate = new AspNetAggregateDictionary(requestCtx);
-
- forKey("Url");
-
- assertWasNotFound();
- }
-
- [Test]
- public void request_for_url_should_come_from_the_server_variables_not_RequestProperty()
- {
- var expectedValue = "ServerVariables URL";
- var requestCtx = Do_the_Stupid_ASPNET_Mock_HokeyPokey();
- var request = requestCtx.HttpContext.Request;
- request.Stub(r => r["Url"]).Return(expectedValue);
- aggregate = new AspNetAggregateDictionary(requestCtx);
-
- forKey("Url");
-
- assertFound(RequestDataSource.Request, expectedValue);
- }
-
- [Test]
- public void find_value_from_request_property_of_added_aggregate()
- {
- const string expectedValue = "STUBBED USERAGENT";
- aggregate = new AggregateDictionary();
-
- aggregate.AddDictionary("Other", new Dictionary<string, object> { { "UserAgent", expectedValue } });
- forKey("UserAgent1");
- callback.AssertWasNotCalled(x => x.Callback(RequestDataSource.Other.ToString(), null), o => o.IgnoreArguments());
-
- forKey("UserAgent");
- assertFound(RequestDataSource.Other, expectedValue);
- }
-
- private RequestContext Do_the_Stupid_ASPNET_Mock_HokeyPokey()
- {
- var context = MockRepository.GenerateStub<HttpContextBase>();
- var request = MockRepository.GenerateStub<HttpRequestBase>();
- context.Stub(c => c.Request).Return(request);
- request.Stub(r => r.Files).Return(MockRepository.GenerateStub<HttpFileCollectionBase>());
- request.Stub(r => r.Headers).Return(new NameValueCollection());
- request.Stub(r => r.Url).Return(new Uri("http://localhost/foo"));
- request.Stub(r => r.UrlReferrer).Return(new Uri("http://localhost/login"));
- return new RequestContext(context, new RouteData());
- }
-
- private bool isSystemProperty<T>(Expression<Func<T, object>> expression)
- {
- var property = ReflectionHelper.GetProperty(expression);
- return AspNetAggregateDictionary.IsSystemProperty(property);
- }
-
- [Test]
- public void when_both_property_type_and_name_match()
- {
- isSystemProperty<SystemTarget>(x => x.AcceptTypes).ShouldBeTrue();
- }
-
- [Test]
- public void when_only_the_property_name_matches()
- {
- isSystemProperty<NonSystemTarget>(x => x.AcceptTypes).ShouldBeFalse();
- }
- }
-
- public class SystemTarget
- {
- public string[] AcceptTypes { get; set; }
-
-
- }
-
- public class NonSystemTarget
- {
- public bool AcceptTypes { get; set; }
- }
-
- public interface IDictionaryCallback
- {
- void Callback(string source, object value);
- }
-}
21 src/FubuMVC.Tests/StructureMapIoC/StructureMapContainerFacilityTester.cs
View
@@ -5,6 +5,7 @@
using FubuCore;
using FubuCore.Binding;
using FubuMVC.Core;
+using FubuMVC.Core.Assets.Caching;
using FubuMVC.Core.Behaviors;
using FubuMVC.Core.Bootstrapping;
using FubuMVC.Core.Http;
@@ -128,7 +129,7 @@ public void each_IActionBehavior_is_wrapped_with_a_nested_container_behavior()
[Test]
public void PropertyBinderCache_should_be_a_singleton()
{
- container.Model.For<IPropertyBinderCache>().Lifecycle.ShouldEqual("Singleton");
+ container.Model.For<IAssetContentCache>().Lifecycle.ShouldEqual("Singleton");
}
[Test]
@@ -171,11 +172,10 @@ public void should_be_able_to_create_the_basic_services_from_the_container()
[Test]
public void should_be_able_to_inject_multiple_implementations_as_a_dependency()
{
- Assert.Fail("Use a different example");
- //IEnumerable<IConverterFamily> converterFamilies =
- // container.GetInstance<IValueConverterRegistry>().ShouldBeOfType<ValueConverterRegistry>().Families;
- //converterFamilies.ShouldContain(f => f.GetType() == typeof (ExampleConverter));
- //converterFamilies.ShouldContain(f => f.GetType() == typeof (ExampleConverter2));
+ IEnumerable<IConverterFamily> converterFamilies =
+ container.GetInstance<BindingRegistry>().AllConverterFamilies();
+ converterFamilies.ShouldContain(f => f.GetType() == typeof(ExampleConverter));
+ converterFamilies.ShouldContain(f => f.GetType() == typeof(ExampleConverter2));
}
[Test]
@@ -207,13 +207,16 @@ public void standard_model_binder_should_not_be_registered_in_the_container()
[Test]
public void behavior_factory_is_available_in_the_container()
{
- Assert.Fail("Do.");
+ container.GetInstance<IBehaviorFactory>().ShouldBeOfType<PartialBehaviorFactory>();
}
[Test]
- public void can_return_the_endpoint_authorizor_for_an_id()
+ public void can_return_the_endpoint_authorizor_for_an_id_smoke_test()
{
- Assert.Fail("Do.");
+ var uniqueId = container.GetInstance<BehaviorGraph>().Behaviors.First().UniqueId;
+
+ container.GetInstance<IBehaviorFactory>().AuthorizorFor(uniqueId).ShouldNotBeNull();
+
}
}
}
3  src/FubuMVC.Tests/packages.config
View
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<packages>
+<packages>
+
<package id="Bottles" version="0.9.1.201" />
<package id="Bottles.Deployers.IIS" version="0.9.1.201" />
<package id="Bottles.Deployment" version="0.9.1.201" />
2  src/FubuMVC.WebForms.Testing/FubuMVC.WebForms.Testing.csproj
View
@@ -32,7 +32,9 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="FubuLocalization">
<HintPath>..\packages\FubuLocalization.0.9.4.116\lib\FubuLocalization.dll</HintPath>
2  src/FubuMVC.WebForms.Testing/packages.config
View
@@ -3,6 +3,8 @@
<package id="FubuCore" version="0.9.4.117" />
<package id="FubuLocalization" version="0.9.4.116" />
<package id="FubuTestingSupport" version="0.9.4.117" />
+
+
<package id="NUnit" version="2.5.10.11092" />
<package id="RhinoMocks" version="3.6" />
<package id="structuremap" version="2.6.3" />
2  src/FubuMVC.WebForms/FubuMVC.WebForms.csproj
View
@@ -32,7 +32,9 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="FubuLocalization">
<HintPath>..\packages\FubuLocalization.0.9.4.116\lib\FubuLocalization.dll</HintPath>
5 src/FubuMVC.WebForms/packages.config
View
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
+
<package id="FubuCore" version="0.9.4.117" />
<package id="FubuLocalization" version="0.9.4.116" />
- <package id="HtmlTags" version="1.0.0.55" />
+ <package id="HtmlTags" version="1.0.0.55" />
+
+
</packages>
1  src/FubuTestApplication/FubuTestApplication.csproj
View
@@ -37,6 +37,7 @@
<HintPath>..\packages\Bottles.0.9.1.201\lib\Bottles.dll</HintPath>
</Reference>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
</Reference>
<Reference Include="HtmlTags">
4 src/FubuTestApplication/packages.config
View
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
-<packages>
+
+<packages>
+
<package id="Bottles" version="0.9.1.201" />
<package id="FubuCore" version="0.9.4.117" />
<package id="HtmlTags" version="1.0.0.55" />
1  src/KayakTestApplication/KayakTestApplication.csproj
View
@@ -32,6 +32,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
</Reference>
<Reference Include="Spark">
2  src/KayakTestApplication/packages.config
View
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FubuCore" version="0.9.4.117" />
+
+
<package id="Spark" version="1.6" />
<package id="structuremap" version="2.6.3" />
</packages>
1  src/QuickStart/QuickStart.csproj
View
@@ -38,6 +38,7 @@
</Reference>
<Reference Include="FubuCore">
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="FubuLocalization">
<HintPath>..\packages\FubuLocalization.0.9.4.116\lib\FubuLocalization.dll</HintPath>
6 src/QuickStart/packages.config
View
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
-<packages>
+
+<packages>
+
<package id="Bottles" version="0.9.1.201" />
<package id="FubuCore" version="0.9.4.117" />
<package id="FubuLocalization" version="0.9.4.116" />
- <package id="HtmlTags" version="1.0.0.55" />
+ <package id="HtmlTags" version="1.0.0.55" />
<package id="Spark" version="1.6" />
<package id="structuremap" version="2.6.3" />
<package id="WebActivator" version="1.5" />
2  src/Serenity.Testing/Serenity.Testing.csproj
View
@@ -38,7 +38,9 @@
<HintPath>..\packages\Castle.Core.2.5.2\lib\NET35\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="FubuLocalization">
<HintPath>..\packages\FubuLocalization.0.9.4.116\lib\FubuLocalization.dll</HintPath>
2  src/Serenity.Testing/packages.config
View
@@ -3,10 +3,12 @@
<package id="Bottles" version="0.9.1.201" />
<package id="Castle.Core" version="2.5.2" />
<package id="DotNetZip" version="1.9.1.8" />
+
<package id="FubuCore" version="0.9.4.117" />
<package id="FubuLocalization" version="0.9.4.116" />
<package id="FubuTestingSupport" version="0.9.4.117" />
<package id="HtmlTags" version="1.0.0.55" />
+
<package id="Newtonsoft.Json" version="4.0.5" />
<package id="NUnit" version="2.5.10.11092" />
<package id="RhinoMocks" version="3.6" />
2  src/Serenity/Serenity.csproj
View
@@ -38,7 +38,9 @@
<HintPath>..\packages\Castle.Core.2.5.2\lib\NET35\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="FubuLocalization">
<HintPath>..\packages\FubuLocalization.0.9.4.116\lib\FubuLocalization.dll</HintPath>
2  src/Serenity/packages.config
View
@@ -4,8 +4,10 @@
<package id="Bottles.Tools" version="0.9.1.201" />
<package id="Castle.Core" version="2.5.2" />
<package id="DotNetZip" version="1.9.1.8" />
+
<package id="FubuCore" version="0.9.4.117" />
<package id="FubuLocalization" version="0.9.4.116" />
+
<package id="Gate" version="0.1.4" />
<package id="Gate.Kayak" version="0.1.4" />
<package id="HtmlTags" version="1.0.0.55" />
2  src/SerenityRunner/SerenityRunner.csproj
View
@@ -36,7 +36,9 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
2  src/SerenityRunner/packages.config
View
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
+
<package id="FubuCore" version="0.9.4.117" />
+
</packages>
2  src/StoryTellerTesting/packages.config
View
@@ -4,9 +4,9 @@
<package id="Castle.Core" version="2.5.2" />
<package id="CommonServiceLocator" version="1.0" />
<package id="DotNetZip" version="1.9.1.8" />
- <package id="FubuCore" version="0.9.4.117" />
<package id="FubuTestingSupport" version="0.9.4.117" />
<package id="HtmlTags" version="1.0.0.55" />
+
<package id="Newtonsoft.Json" version="4.0.5" />
<package id="NUnit" version="2.5.10.11092" />
<package id="RhinoMocks" version="3.6" />
2  src/TestPackage1/TestPackage1.csproj
View
@@ -34,7 +34,9 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>
<Reference Include="FubuLocalization">
<HintPath>..\packages\FubuLocalization.0.9.4.116\lib\FubuLocalization.dll</HintPath>
2  src/TestPackage1/packages.config
View
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
+
<package id="FubuCore" version="0.9.4.117" />
<package id="FubuLocalization" version="0.9.4.116" />
+
</packages>
2  src/TestPackage2/TestPackage2.csproj
View
@@ -34,7 +34,9 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="FubuCore">
+
<HintPath>..\packages\FubuCore.0.9.4.117\lib\FubuCore.dll</HintPath>
+
</Reference>