Permalink
Browse files

Updated Statlight and added Windows Phone Unit test execution to the …

…build process
  • Loading branch information...
1 parent 022452f commit 8f90297485523745c94b073bc9fe7e7f1d3807dc @remogloor remogloor committed Jan 26, 2012
Showing with 53 additions and 27 deletions.
  1. +3 −0 Ninject.build
  2. +3 −2 Ninject.include
  3. +6 −25 src/Ninject.Test/Integration/StandardKernelTests.cs
  4. BIN tools/statlight/Ionic.Zip.Reduced.dll
  5. BIN tools/statlight/Ninject.WindowsPhone7Tests.xap
  6. BIN tools/statlight/StatLight.Client.For.April2010.xap
  7. BIN tools/statlight/StatLight.Client.For.Feb2011.xap
  8. BIN tools/statlight/StatLight.Client.For.July2009.xap
  9. BIN tools/statlight/StatLight.Client.For.MSTest2009July.xap
  10. BIN tools/statlight/StatLight.Client.For.MSTest2009November.xap
  11. BIN tools/statlight/StatLight.Client.For.MSTest2009October.xap
  12. BIN tools/statlight/StatLight.Client.For.MSTest2010April.xap
  13. BIN tools/statlight/StatLight.Client.For.MSTest2010March.xap
  14. BIN tools/statlight/StatLight.Client.For.MSTest2010May.xap
  15. BIN tools/statlight/StatLight.Client.For.MSTest2010MayPhone.xap
  16. BIN tools/statlight/StatLight.Client.For.MSTest2011December.xap
  17. BIN tools/statlight/StatLight.Client.For.MSTest2011Feb.xap
  18. BIN tools/statlight/StatLight.Client.For.MSTest2011June.xap
  19. BIN tools/statlight/StatLight.Client.For.MSTest2011October.xap
  20. BIN tools/statlight/StatLight.Client.For.March2010.xap
  21. BIN tools/statlight/StatLight.Client.For.May2010.xap
  22. BIN tools/statlight/StatLight.Client.For.November2009.xap
  23. BIN tools/statlight/StatLight.Client.For.October2009.xap
  24. BIN tools/statlight/StatLight.Client.For.UnitDriven2009December.xap
  25. BIN tools/statlight/StatLight.Client.For.UnitDrivenDecember2009.xap
  26. BIN tools/statlight/StatLight.Client.For.XUnitContrib2011April.xap
  27. BIN tools/statlight/StatLight.Client.For.XUnitContrib2011AprilPhone.xap
  28. BIN tools/statlight/StatLight.Client.For.XUnitContribApril2011.xap
  29. BIN tools/statlight/StatLight.Core.dll
  30. BIN tools/statlight/StatLight.WindowsPhoneEmulator.dll
  31. BIN tools/statlight/StatLight.exe
  32. +41 −0 tools/statlight/StatLight.exe.config
View
@@ -168,6 +168,9 @@
<fileset basedir="${path.src}/${product.name}.SilverlightTests/Silverlight3">
<include name="AppManifest.xaml" unless="${string::contains(build.platform, 'silverlight-4.0')}"/>
</fileset>
+ <fileset basedir="${path.lib}">
+ <include name="System.Linq.dll" if="${string::contains(build.platform, 'wp7') and not(string::contains(build.platform, 'wp71'))}"/>
+ </fileset>
</zip>
</target>
</project>
View
@@ -366,10 +366,11 @@
</if>
</target>
- <target name="silverlight-test" depends="compile-silverlight-tests" unless="${skip.tests or skip.silverlightTests or string::contains(build.platform, 'wp7')}" if="${string::contains(build.platform, 'silverlight')}">
+ <target name="silverlight-test" depends="compile-silverlight-tests" unless="${skip.tests or skip.silverlightTests}" if="${string::contains(build.platform, 'silverlight')}">
<property name="cmdLine" value='-x"${product.assembly.silverlighttest}" --teamcity --debug' if="${teamcity}"/>
<property name="cmdLine" value='-x"${product.assembly.silverlighttest}"' unless="${teamcity}"/>
- <exec program="${path.tools.statlight}" workingdir="${current.path.test}" commandline="${cmdLine}" failonerror="true"/>
+ <exec program="${path.tools.statlight}" workingdir="${current.path.test}" commandline="${cmdLine}" failonerror="true" unless="${string::contains(build.platform, 'wp')}" />
+ <exec program="${path.tools.statlight}" workingdir="${current.path.test}" commandline="${cmdLine} --UsePhoneEmulator" failonerror="true" if="${string::contains(build.platform, 'wp')}" />
</target>
<target name="UnzipDependencies">
@@ -434,34 +434,15 @@ public void RemovesAllBindingsForServiceAndReplacesWithSpecifiedBinding()
public class sdf : StandardKernelContext
{
[Fact]
- public void RemovesAllBindingsForServiceAndReplacesWithSpecifiedBinding()
- {
- kernel.Bind<IWeapon>().To<Shuriken>().When(r => r.ParentRequest.Service.GetGenericArguments()[0] == typeof(string));
- kernel.Bind<IWeapon>().To<Sword>().When(r => r.ParentRequest.Service.GetGenericArguments()[0] == typeof(int));
- kernel.Bind(typeof(IRepository<>)).To(typeof(Repository<>));
-
- var repo = kernel.Get<IRepository<int>>();
-
- repo.Weapon.Should().BeOfType<Sword>();
- }
-
- public interface IRepository<T>
+ public void Ddd()
{
- IWeapon Weapon { get; }
- }
-
- public class Repository<T> : IRepository<T>
- {
- public Repository(IWeapon weapon)
- {
- this.Weapon = weapon;
- }
-
- public IWeapon Weapon { get; private set; }
+ this.kernel.Bind<IWeapon>().To<Sword>();
+ this.kernel.Bind<IWarrior>().To<Ninja>();
+ this.kernel.Bind<IWarrior>().To<Samurai>().When(c => true);
+ this.kernel.GetAll<IWarrior>().Count().Should().Be(2);
}
}
-
-
+
public class WhenCanResolveIsCalled : StandardKernelContext
{
[Fact]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<configuration>
+ <configSections>
+ <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+ <section name="StatLight.Core.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+ </sectionGroup>
+ </configSections>
+ <applicationSettings>
+
+ <!-- NOTE: the ConsoleColor{Name} settings are from the System.ConsoleColor enum (you can change these to any value in there)-->
+ <StatLight.Core.Properties.Settings>
+ <setting name="ConsoleColorError" serializeAs="String">
+ <value>Red</value>
+ </setting>
+ <setting name="ConsoleColorInformation" serializeAs="String">
+ <value>White</value>
+ </setting>
+ <setting name="ConsoleColorDebug" serializeAs="String">
+ <value>Cyan</value>
+ </setting>
+ <setting name="ConsoleColorWarning" serializeAs="String">
+ <value>Yellow</value>
+ </setting>
+ <setting name="ConsoleColorSuccess" serializeAs="String">
+ <value>Green</value>
+ </setting>
+
+ <!--
+ Windowless value will be used to set the silverlight object tag in the test page html. EX if the
+ windowless property is 'false' then it will output <param name="windowless" value="false"/> in the html
+ -->
+ <setting name="Windowless" serializeAs="String">
+ <value>false</value>
+ </setting>
+
+ </StatLight.Core.Properties.Settings>
+ </applicationSettings>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
+ </startup>
+</configuration>

0 comments on commit 8f90297

Please sign in to comment.