Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
drusellers committed Sep 26, 2009
1 parent ef55ea2 commit a0657be
Show file tree
Hide file tree
Showing 10 changed files with 136 additions and 17 deletions.
32 changes: 31 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
.\tools\nant-0.85\nant.exe /f:.\tools\BuildScripts\magnum.build
@echo off

::Project UppercuT - http://uppercut.googlecode.com
::No edits to this file are required - http://uppercut.pbwiki.com

if '%2' NEQ '' goto usage
if '%3' NEQ '' goto usage
if '%1' == '/?' goto usage
if '%1' == '-?' goto usage
if '%1' == '?' goto usage
if '%1' == '/help' goto usage

SET DIR=%~d0%~p0%

SET build.config.settings="%DIR%settings\UppercuT.config"
"%DIR%lib\Nant\nant.exe" %1 /f:.\build\default.build -D:build.config.settings=%build.config.settings%

if %ERRORLEVEL% NEQ 0 goto errors

goto finish

:usage
echo.
echo Usage: build.bat
echo.
goto finish

:errors
EXIT /B %ERRORLEVEL%

:finish
15 changes: 15 additions & 0 deletions settings/LOCAL.settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<project name="Settings">
<property name="environment" value="LOCAL" />
<property name="machine" value="MACHINE.NAME" />
<property name="database.server" value="(local)" />
<property name="database.name" value="NAME" />
<property name="log.level" value="INFO" />

<!-- Database Deployment -->
<property name="dirs.db" value="..\..\db" />
<property name="database.action" value="Create" />

<!-- Castle Service Locators -->
<property name="orm.websitesConfigurationStore" value="${'${orm.websitesConfigurationStore}'}" />
</project>
2 changes: 2 additions & 0 deletions settings/SettingsFileReadMe.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Warning!
You cannot edit these settings files with Visual Studio. It believes they are something they are not.
49 changes: 49 additions & 0 deletions settings/UppercuT.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8" ?>
<project name="BuildSettings">
<!-- Project UppercuT - http://projectuppercut.org -->
<!-- Learn how to edit this file at http://uppercut.pbwiki.com -->

<!-- PROJECT VARIABLES -->
<property name="project.name" value="Magnum" overwrite="false" />
<property name="path_to_solution" value=".\src" overwrite="false" />
<property name="repository.path" value="http://magnum.googlecode.com/svn/trunk" overwrite="false" />
<property name="company.name" value="CFT &amp; ACM" overwrite="false" />
<property name="dirs.db.project" value="__DATABASE_FOLDER_NAME__" overwrite="false" />
<property name="dirs.report.project" value="__REPORT_PROJECT_FOLDER__" overwrite="false" />
<property name="dirs.documentation" value="docs" overwrite="false" />
<property name="app.drop.folder" value="app" overwrite="false" />

<!-- FRAMEWORKS -->
<!-- microsoft.framework: net-1.1,net-2.0,net-3.5 -->
<property name="microsoft.framework" value="net-3.5" overwrite="false" />
<!-- microsoft.framework: net-1.1,net-2.0,net-3.5 -->
<!-- language.short: vb,cs -->
<property name="language.short" value="cs" overwrite="false" />
<!-- test.framework: mbunit2, nunit, gallio - with gallio it must be installed in program files on every computer. Alternatively you can add 26MB to your repo and put it there. Little much for my tastes. -->
<property name="test.framework" value="nunit" overwrite="false" />
<!-- source_control_type: svn, vss, tfs, vault, git -->
<property name="source_control_type" value="svn" overwrite="false" />

<!-- ASSEMBLY VARIABLES -->
<property name="version.major" value="0" overwrite="false" />
<property name="version.minor" value="0" overwrite="false" />
<!-- partially trusted callers doesn't set correctly with assembly generator - Leave false for now-->
<property name="allow.partially_trusted_callers" value="false" overwrite="false" />

<!-- EXTERNAL TOOLS -->
<!-- To not use the tool, change to a location that doesn't exist -->
<property name="app.ncover" value="..\..\lib\NCover\NCover.Console.exe" overwrite="false" />
<property name="app.ncover_explorer" value="..\..\lib\NCover\NCoverExplorer.Console.exe" overwrite="false" />
<property name="app.ncover.tester" value="..\..\lib\MbUnit2\MbUnit.Cons.exe" overwrite="false" />
<!--<property name="app.ncover.tester" value="..\..\lib\NUnit\nunit-console.exe" overwrite="false" />-->
<property name="app.ndepend" value="C:\Program Files\NDepend\NDepend.Console.exe" overwrite="false" />

<!-- COMPILE VARIABLES -->
<property name="msbuild.configuration" value="Release" overwrite="false" />
<property name="msbuild.platform" value="Any CPU" overwrite="false" />

<!-- POLICIES -->
<property name="file.installation_document" value="..\${dirs.documentation}\Installation\${project.name}Installation.doc" overwrite="false" />
<property name="fail.if_no_installation_document" value="false" overwrite="false" />

</project>
4 changes: 0 additions & 4 deletions src/Magnum.Infrastructure/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,5 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

[assembly : AssemblyTitle("Magnum.Infrastructure")]
[assembly : AssemblyDescription("")]
[assembly : AssemblyConfiguration("")]
[assembly : AssemblyProduct("Magnum.Infrastructure")]
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
38 changes: 34 additions & 4 deletions src/Magnum.Specs/EventStreamProcessing/ObjectParser_specs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
// specific language governing permissions and limitations under the License.
namespace Magnum.Specs.CEP
{
using System;
using System.Collections.Generic;
using NUnit.Framework;
using System.Linq;
using Magnum.Pipeline;
using NUnit.Framework;

[TestFixture]
public class ObjectParser_specs
{


[Test]
public void Three_failed_attempts_in_a_row_should_fire_BruteForceMessage()
{
Expand All @@ -32,11 +36,37 @@ public void Three_failed_attempts_in_a_row_should_fire_BruteForceMessage()

var parser = new PossibleAttackPattern();

var output = parser.Match(list);

IEnumerable<PossibleBruteForceAttack> output = parser.Match(list);


Assert.AreEqual(1, output.Count());
}

[Test]
public void Three_failed_attempts_in_a_row_should_fire_BruteForceMessage_with_other_user_interuption()
{
var list = new List<LoginAttempt>
{
new LoginFailed("b"),
new LoginFailed("b"),
new LoginSucceeded("a"),
new LoginFailed("b")
};

var b = from a in list
group a by a.Username;

var x = from a in b
from p in a
select (object)p;

var parser = new PossibleAttackPattern();


IEnumerable<PossibleBruteForceAttack> output = parser.Match(new List<object>(x));


Assert.AreEqual(1, output.Count());

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ public class PossibleAttackPattern :
public PossibleAttackPattern()
{
//Define( ()=> {}); ????
BadMessage = Obj<LoginFailed, LoginAttempt>();
BadMessage = Obj<LoginFailed, LoginFailed>();

//how to ignore the success?
ThePattern = from a in BadMessage
from b in BadMessage
from c in BadMessage
Expand All @@ -23,7 +24,7 @@ from a in ThePattern
select a;
}
public Parser<IEnumerable<object>, PossibleBruteForceAttack> ThePattern;
public Parser<IEnumerable<object>, LoginAttempt> BadMessage;
public Parser<IEnumerable<object>, LoginFailed> BadMessage;
public Parser<IEnumerable<object>, PossibleBruteForceAttack> All;

public override sealed Parser<IEnumerable<object>, object> AnyObject
Expand Down
2 changes: 1 addition & 1 deletion src/Magnum.Specs/Magnum.Specs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0BEBC5E0-BDC4-421C-971B-2C5BE3204F7C}</ProjectGuid>
<OutputType>Library</OutputType>
Expand Down
2 changes: 1 addition & 1 deletion src/Magnum/Magnum.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C3650C32-0850-48B4-BE71-ECE9FACBD356}</ProjectGuid>
<OutputType>Library</OutputType>
Expand Down
4 changes: 0 additions & 4 deletions src/Magnum/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,5 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

[assembly : AssemblyTitle("Magnum.Common")]
[assembly : AssemblyDescription("")]
[assembly : AssemblyConfiguration("")]
[assembly : AssemblyProduct("Magnum.Common")]
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]

0 comments on commit a0657be

Please sign in to comment.