Permalink
Browse files

Work on Distribution stuff for Specifications.

Adding Gallio apache license stuff for the code I "borrowed".
  • Loading branch information...
1 parent 9e47b79 commit 8f354e3a343ab39e69d35d09109252fcc1a4d19f @aaronjensen aaronjensen committed May 8, 2008
Showing with 394 additions and 58 deletions.
  1. +15 −0 Distribution/Specifications/InstallTDNetRunner.bat
  2. +15 −0 Distribution/Specifications/InstallTDNetRunnerSilent.bat
  3. +20 −0 Distribution/Specifications/License.txt
  4. +29 −0 Distribution/Specifications/Machine.Specifications.Example/Account.cs
  5. +82 −0 Distribution/Specifications/Machine.Specifications.Example/BankingSpecs.cs
  6. +66 −0 Distribution/Specifications/Machine.Specifications.Example/Machine.Specifications.Example.csproj
  7. +36 −0 Distribution/Specifications/Machine.Specifications.Example/Properties/AssemblyInfo.cs
  8. +2 −1 License.txt
  9. +18 −1 Source/Specifications/Machine.Specifications.GallioAdapter.Tests/BaseTestFrameworkTest.cs
  10. +18 −1 Source/Specifications/Machine.Specifications.GallioAdapter.Tests/FrameworkTests.cs
  11. +14 −0 Source/Specifications/Machine.Specifications.GallioAdapter.Tests/Gallio License.txt
  12. +14 −0 Source/Specifications/Machine.Specifications.GallioAdapter/Gallio License.txt
  13. +3 −0 ...e/Specifications/Machine.Specifications.GallioAdapter/Machine.Specifications.GallioAdapter.csproj
  14. +1 −17 Source/Specifications/Machine.Specifications.GallioAdapter/Properties/AssemblyInfo.cs
  15. +18 −2 ...ce/Specifications/Machine.Specifications.GallioAdapter/Services/MachineSpecificationController.cs
  16. +17 −0 Source/Specifications/Machine.Specifications.GallioAdapter/Services/MachineSpecificationsExplorer.cs
  17. +4 −1 Source/Specifications/Machine.Specifications.TDNetRunner/Machine.Specifications.TDNetRunner.csproj
  18. +1 −18 Source/Specifications/Machine.Specifications.TDNetRunner/Properties/AssemblyInfo.cs
  19. +1 −0 Source/Specifications/Machine.Specifications/Machine.Specifications.csproj
  20. +1 −17 Source/Specifications/Machine.Specifications/Properties/AssemblyInfo.cs
  21. +19 −0 Source/Specifications/Machine.Specifications/Properties/SharedAssemblyInfo.cs
@@ -0,0 +1,15 @@
+@echo off & if not "%ECHO%"=="" echo %ECHO%
+
+setlocal
+set LOCALDIR=%~dp0
+
+echo Windows Registry Editor Version 5.00 > MSpecTDNet.reg
+echo [HKEY_CURRENT_USER\Software\MutantDesign\TestDriven.NET\TestRunners\MSpec] >> MSpecTDNet.reg
+echo "Application"="" >> MSpecTDNet.reg
+echo "AssemblyPath"="%LOCALDIR:\=\\%Machine.Specifications.TDNetRunner.dll" >> MSpecTDNet.reg
+echo "TargetFrameworkAssemblyName"="Machine.Specifications" >> MSpecTDNet.reg
+echo "TypeName"="Machine.Specifications.TDNetRunner.SpecificationRunner" >> MSpecTDNet.reg
+echo @="5" >> MSpecTDNet.reg
+
+regedit MSpecTDNet.reg
+
@@ -0,0 +1,15 @@
+@echo off & if not "%ECHO%"=="" echo %ECHO%
+
+setlocal
+set LOCALDIR=%~dp0
+
+echo Windows Registry Editor Version 5.00 > MSpecTDNet.reg
+echo [HKEY_CURRENT_USER\Software\MutantDesign\TestDriven.NET\TestRunners\MSpec] >> MSpecTDNet.reg
+echo "Application"="" >> MSpecTDNet.reg
+echo "AssemblyPath"="%LOCALDIR:\=\\%Machine.Specifications.TDNetRunner.dll" >> MSpecTDNet.reg
+echo "TargetFrameworkAssemblyName"="Machine.Specifications" >> MSpecTDNet.reg
+echo "TypeName"="Machine.Specifications.TDNetRunner.SpecificationRunner" >> MSpecTDNet.reg
+echo @="5" >> MSpecTDNet.reg
+
+regedit /s MSpecTDNet.reg
+
@@ -0,0 +1,20 @@
+Copyright (c) 2008 Machine Project
+Portions Copyright (c) 2008 Jacob Lewallen, Aaron Jensen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Machine.Specifications.Example
+{
+ public class Account
+ {
+ private decimal _balance;
+
+ public decimal Balance
+ {
+ get { return _balance; }
+ set { _balance = value; }
+ }
+
+ public void Transfer(decimal amount, Account toAccount)
+ {
+ if (amount > _balance)
+ {
+ throw new Exception(String.Format("Cannot transfer ${0}. The available balance is ${1}.", amount, _balance));
+ }
+
+ _balance -= amount;
+ toAccount.Balance += amount;
+ }
+ }
+}
@@ -0,0 +1,82 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Machine.Specifications.Example
+{
+ [Description]
+ public class Transferring_between_from_account_and_to_account
+ {
+ static Account fromAccount;
+ static Account toAccount;
+
+ Context before_each =()=>
+ {
+ fromAccount = new Account {Balance = 1m};
+ toAccount = new Account {Balance = 1m};
+ };
+
+ When the_transfer_is_made =()=>
+ {
+ fromAccount.Transfer(1m, toAccount);
+ };
+
+ It should_debit_the_from_account_by_the_amount_transferred =()=>
+ {
+ fromAccount.Balance.ShouldEqual(0m);
+ };
+
+ It should_credit_the_to_account_by_the_amount_transferred =()=>
+ {
+ toAccount.Balance.ShouldEqual(2m);
+ };
+ }
+
+ public abstract class with_from_account_and_to_account
+ {
+ protected static Account fromAccount;
+ protected static Account toAccount;
+
+ Context before_each =()=>
+ {
+ fromAccount = new Account {Balance = 1m};
+ toAccount = new Account {Balance = 1m};
+ };
+ }
+
+ [Description]
+ public class Transferring_between_two_accounts
+ : with_from_account_and_to_account
+ {
+ When the_transfer_is_made =()=>
+ {
+ fromAccount.Transfer(1m, toAccount);
+ };
+
+ It should_debit_the_from_account_by_the_ammount_transferred =()=>
+ {
+ fromAccount.Balance.ShouldEqual(0m);
+ };
+
+ It should_credit_the_to_account_by_the_amount_transferred =()=>
+ {
+ toAccount.Balance.ShouldEqual(2m);
+ };
+ }
+
+ [Description]
+ public class Transferring_an_amount_greater_than_the_balance_of_the_from_account
+ : with_from_account_and_to_account
+ {
+ When the_transfer_is_made =()=>
+ {
+ fromAccount.Transfer(2m, toAccount);
+ };
+
+ It_should_throw a_System_Exception =x=>
+ {
+ x.ShouldBeOfType<Exception>();
+ };
+ }
+}
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{2C28C643-31A2-44CA-B762-953A963F6F61}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Machine.Specifications.Example</RootNamespace>
+ <AssemblyName>Machine.Specifications.Example</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </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="Machine.Specifications, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Machine.Specifications.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Account.cs" />
+ <Compile Include="BankingSpecs.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- 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("Machine.Specifications.Example")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Machine.Specifications.Example")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2008")]
+[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("01cb66b4-916d-46d3-a63e-afd05644228e")]
+
+// 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")]
View
@@ -1,4 +1,5 @@
-Copyright (c) 2008 Jacob Lewallen, Aaron Jensen
+Copyright (c) 2008 Machine Project
+Portions Copyright (c) 2008 Jacob Lewallen, Aaron Jensen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,21 @@
-using System;
+// Copyright 2005-2008 Gallio Project - http://www.gallio.org/
+// Portions Copyright 2000-2004 Jonathan De Halleux, Jamie Cansdale
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Modified by and Portions Copyright 2008 Machine Project
+
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
@@ -1,4 +1,21 @@
-using System;
+// Copyright 2005-2008 Gallio Project - http://www.gallio.org/
+// Portions Copyright 2000-2004 Jonathan De Halleux, Jamie Cansdale
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Modified by and Portions Copyright 2008 Machine Project
+
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -0,0 +1,14 @@
+Copyright 2005-2008 Gallio Project - http://www.gallio.org/
+Portions Copyright 2000-2004 Jonathan De Halleux, Jamie Cansdale
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
@@ -0,0 +1,14 @@
+Copyright 2005-2008 Gallio Project - http://www.gallio.org/
+Portions Copyright 2000-2004 Jonathan De Halleux, Jamie Cansdale
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
@@ -49,6 +49,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Machine.Specifications\Properties\SharedAssemblyInfo.cs">
+ <Link>Properties\SharedAssemblyInfo.cs</Link>
+ </Compile>
<Compile Include="Model\MachineTest.cs" />
<Compile Include="Services\MachineSpecificationsExplorer.cs" />
<Compile Include="MachineSpecificationsFramework.cs" />
@@ -8,10 +8,7 @@
[assembly: AssemblyTitle("Machine.SpecificationsAdapter")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Machine.SpecificationsAdapter")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2008")]
-[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
@@ -20,17 +17,4 @@
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("236ba289-a746-4be6-90b4-739ff11054d6")]
-
-// 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")]
+[assembly: Guid("236ba289-a746-4be6-90b4-739ff11054d6")]
Oops, something went wrong.

0 comments on commit 8f354e3

Please sign in to comment.