Permalink
Browse files

Updated to latest versions of Quartz/Ninject. Added test suite

  • Loading branch information...
unknown unknown
unknown authored and unknown committed May 25, 2015
1 parent 128c6e1 commit 2c6dfe1fa9f2a93cd6fc8ceb3bcc94b8a98b4931
BIN +52 KB (100%) .nuget/NuGet.exe
Binary file not shown.
BIN -545 KB .nuget/NuGet.exe.old
Binary file not shown.
@@ -3,12 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.Extensions.Quartz", "Source\Ninject.Extensions.Quartz\Ninject.Extensions.Quartz.csproj", "{26E7335D-C92D-4CDF-89B7-DC93EC34BDB5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.Extensions.Quartz.Tests", "Source\Ninject.Extensions.Quartz.Tests\Ninject.Extensions.Quartz.Tests.csproj", "{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release 3.5|Any CPU = Release 3.5|Any CPU
Release 4.0|Any CPU = Release 4.0|Any CPU
Release 4.5|Any CPU = Release 4.5|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{26E7335D-C92D-4CDF-89B7-DC93EC34BDB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -19,6 +22,18 @@ Global
{26E7335D-C92D-4CDF-89B7-DC93EC34BDB5}.Release 4.0|Any CPU.Build.0 = Release 4.0|Any CPU
{26E7335D-C92D-4CDF-89B7-DC93EC34BDB5}.Release 4.5|Any CPU.ActiveCfg = Release|Any CPU
{26E7335D-C92D-4CDF-89B7-DC93EC34BDB5}.Release 4.5|Any CPU.Build.0 = Release|Any CPU
{26E7335D-C92D-4CDF-89B7-DC93EC34BDB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26E7335D-C92D-4CDF-89B7-DC93EC34BDB5}.Release|Any CPU.Build.0 = Release|Any CPU
{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}.Release 3.5|Any CPU.ActiveCfg = Release|Any CPU
{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}.Release 3.5|Any CPU.Build.0 = Release|Any CPU
{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}.Release 4.0|Any CPU.ActiveCfg = Release|Any CPU
{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}.Release 4.0|Any CPU.Build.0 = Release|Any CPU
{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}.Release 4.5|Any CPU.ActiveCfg = Release|Any CPU
{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}.Release 4.5|Any CPU.Build.0 = Release|Any CPU
{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -0,0 +1,57 @@
using System;
using NUnit.Framework;
using Ninject.Modules;
using Quartz;
using Quartz.Spi;

namespace Ninject.Extensions.Quartz.Tests
{
[TestFixture]
public class JobTests
{
private IKernel _kernel;
private static bool _hasRun;

[SetUp]
public void Setup()
{
_kernel = new StandardKernel();
}

[Test]
public void TestKernelCanInstantiateScheduler()
{
var scheduler = _kernel.Get<IScheduler>();
Assert.IsNotNull(scheduler);
}

[Test]
public void TestHarnessCanCreateJob()
{
var scheduler = _kernel.Get<IScheduler>();

IJobDetail testJob = JobBuilder
.Create<TestJob>()
.Build();

ITrigger runOnce = TriggerBuilder.Create().WithSimpleSchedule(builder => builder.WithRepeatCount(0)).Build();

scheduler.ScheduleJob(testJob, runOnce);

scheduler.Start();

System.Threading.Thread.Sleep(TimeSpan.FromSeconds(5.0));

Assert.IsTrue(_hasRun);
}

public class TestJob : IJob
{
public void Execute(IJobExecutionContext context)
{
_hasRun = true;
}
}

}
}
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B7B3CC80-C298-4BEE-9BCE-6D7EE649308B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Ninject.Extensions.Quartz.Tests</RootNamespace>
<AssemblyName>Ninject.Extensions.Quartz.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Common.Logging, Version=3.0.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<HintPath>..\..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Common.Logging.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<HintPath>..\..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Ninject, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
<HintPath>..\..\packages\Ninject.3.2.2.0\lib\net45-full\Ninject.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Quartz, Version=2.3.2.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
<HintPath>..\..\packages\Quartz.2.3.2\lib\net40\Quartz.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="JobTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="job_scheduling_data_2_0.xsd">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Ninject.Extensions.Quartz\Ninject.Extensions.Quartz.csproj">
<Project>{26e7335d-c92d-4cdf-89b7-dc93ec34bdb5}</Project>
<Name>Ninject.Extensions.Quartz</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Ninject.Extensions.Quartz.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Ninject.Extensions.Quartz.Tests")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8ad67aa5-9f67-40f2-85d7-13b015251fa2")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Oops, something went wrong.

0 comments on commit 2c6dfe1

Please sign in to comment.