Skip to content

Commit

Permalink
Updating RhinoMocks to 3.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastien BIAUDET committed Aug 4, 2016
1 parent 8eacf94 commit c39822a
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 5,480 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
<HintPath>..\..\..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Rhino.Mocks">
<HintPath>..\..\..\lib\ThirdParty\RhinoMocks\Rhino.Mocks.dll</HintPath>
<Private>False</Private>
<Reference Include="Rhino.Mocks, Version=3.6.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
1 change: 1 addition & 0 deletions Extensions/src/Ncqrs.EventBus.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<packages>
<package id="FluentAssertions" version="4.12.0" targetFramework="net451" />
<package id="NUnit" version="3.4.1" targetFramework="net451" />
<package id="RhinoMocks" version="3.6.1" targetFramework="net451" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void Save_SmokeTest()
new CustomerNameChanged("Name" + sequenceCounter), new Version(1, 0)));
_store.Store(stream);
_transaction.Commit();
}
}

[Test]
public void Rolling_back_transaction_should_remove_inserted_rows()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
<HintPath>..\..\..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Rhino.Mocks">
<HintPath>..\..\..\lib\ThirdParty\RhinoMocks\Rhino.Mocks.dll</HintPath>
<Private>False</Private>
<Reference Include="Rhino.Mocks, Version=3.6.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Data.SQLite">
<HintPath>..\..\..\lib\ThirdParty\SqlLite\System.Data.SQLite.DLL</HintPath>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
using Ncqrs.Eventing.Sourcing;

namespace Ncqrs.Eventing.Storage.SQLite.Tests{
using System;
using System.Data.SQLite;
using System.IO;
using System.Linq;
using Fakes;
using FluentAssertions;
using NUnit.Framework;
using Rhino.Mocks;

[TestFixture]
public class SQLiteEventStoreTests{
[SetUp]
public void Setup()
{
_path = Path.GetTempFileName();
_connString = string.Format("Data Source={0};", _path);
File.Delete(_path);
namespace Ncqrs.Eventing.Storage.SQLite.Tests{
using System;
using System.Data.SQLite;
using System.IO;
using System.Linq;
using Fakes;
using FluentAssertions;
using NUnit.Framework;
using Rhino.Mocks;

[TestFixture]
public class SQLiteEventStoreTests{
[SetUp]
public void Setup()
{
_path = Path.GetTempFileName();
_connString = string.Format("Data Source={0};", _path);
File.Delete(_path);
SQLiteEventStore.EnsureDatabaseExists(_connString);
_store = new SQLiteEventStore(_connString);
}

[TearDown]
public void Teardown()
{
File.Delete(_path);
}

private string _path;
private string _connString;
private SQLiteEventStore _store;

[Test]
public void EnsuresDatabaseExists()
{
using (var conn = new SQLiteConnection(_connString)) conn.Open();
}

[Test]
public void Save_SmokeTest()
{
var sequenceCounter = 0;
_store = new SQLiteEventStore(_connString);
}

[TearDown]
public void Teardown()
{
File.Delete(_path);
}

private string _path;
private string _connString;
private SQLiteEventStore _store;

[Test]
public void EnsuresDatabaseExists()
{
using (var conn = new SQLiteConnection(_connString)) conn.Open();
}

[Test]
public void Save_SmokeTest()
{
var sequenceCounter = 0;
var id=Guid.NewGuid();
var stream = new UncommittedEventStream(Guid.NewGuid());
stream.Append(
Expand All @@ -52,14 +52,14 @@ public void Save_SmokeTest()
new CustomerNameChanged("Name" + sequenceCounter), new Version(1, 0)));
stream.Append(
new UncommittedEvent(Guid.NewGuid(), id, sequenceCounter++, 0, DateTime.UtcNow,
new CustomerNameChanged("Name" + sequenceCounter), new Version(1, 0)));

_store.Store(stream);
}

[Test]
public void Retrieving_all_events_should_return_the_same_as_added() {
var id=Guid.NewGuid();
new CustomerNameChanged("Name" + sequenceCounter), new Version(1, 0)));

_store.Store(stream);
}

[Test]
public void Retrieving_all_events_should_return_the_same_as_added() {
var id=Guid.NewGuid();
var sequenceCounter=0;

var stream = new UncommittedEventStream(Guid.NewGuid());
Expand All @@ -71,13 +71,13 @@ public void Retrieving_all_events_should_return_the_same_as_added() {
new CustomerNameChanged("Name" + sequenceCounter), new Version(1, 0)));
stream.Append(
new UncommittedEvent(Guid.NewGuid(), id, sequenceCounter++, 0, DateTime.UtcNow,
new CustomerNameChanged("Name" + sequenceCounter), new Version(1, 0)));

_store.Store(stream);

var result=_store.ReadFrom(id, long.MinValue, long.MaxValue);
result.Count().Should().Be(stream.Count());
result.First().EventIdentifier.Should().Be(stream.First().EventIdentifier);
new CustomerNameChanged("Name" + sequenceCounter), new Version(1, 0)));

_store.Store(stream);

var result=_store.ReadFrom(id, long.MinValue, long.MaxValue);
result.Count().Should().Be(stream.Count());
result.First().EventIdentifier.Should().Be(stream.First().EventIdentifier);
//TODO:

var streamList = stream.ToList();
Expand Down Expand Up @@ -125,5 +125,5 @@ public void Retrieved_event_should_having_identical_timestamp_as_persisted() {
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<packages>
<package id="FluentAssertions" version="4.12.0" targetFramework="net451" />
<package id="NUnit" version="3.4.1" targetFramework="net451" />
<package id="RhinoMocks" version="3.6.1" targetFramework="net451" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
<HintPath>..\..\..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Rhino.Mocks">
<HintPath>..\..\..\lib\ThirdParty\RhinoMocks\Rhino.Mocks.dll</HintPath>
<Private>False</Private>
<Reference Include="Rhino.Mocks, Version=3.6.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
1 change: 1 addition & 0 deletions Extensions/src/Ncqrs.NServiceBus.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<packages>
<package id="FluentAssertions" version="4.12.0" targetFramework="net451" />
<package id="NUnit" version="3.4.1" targetFramework="net451" />
<package id="RhinoMocks" version="3.6.1" targetFramework="net451" />
</packages>
Binary file removed lib/ThirdParty/RhinoMocks/Rhino.Mocks.dll
Binary file not shown.
Loading

0 comments on commit c39822a

Please sign in to comment.