dependabot-preview[bot] on nuget
dependabot-preview[bot] on nuget
Bump FakeItEasy from 1.25.3 to … (compare)
dependabot-preview[bot] on nuget
Bump NUnit from 2.6.4 to 3.12.0… (compare)
Tests/HelloOrigoSmokeTests.cs -> Happy_path()
[Test]
public void Happy_path()
{
Config.Engines.CloseAll();
try
{
Console.WriteLine("Hosting the engine");
//------------------------------------
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory);
Environment.CurrentDirectory = path;
var config = new EngineConfiguration()
{
JournalPath = path
};
IEngine<VetModel> engine = Engine.For<VetModel>();
Console.WriteLine("Executing commands");
// ------------------------------------
var cat = new Cat()
{
DOB = DateTime.UtcNow,
Name = NameGenerator.Generate(Gender.Female)
};
engine.Execute(new RegisterBirthCommand(cat));
Console.WriteLine("Executing query");
// ------------------------------------
var localEngine = (LocalEngineClient<VetModel>)engine;
var cats = localEngine.Execute(db => db.Cats.Where(c => true)).ToArray();
foreach (var c in cats) Console.WriteLine(c);
}
finally
{
Config.Engines.CloseAll();
}
}
Foo
(Cat) is not marked as serializable, and it is. mmm!
fail2
If a command fails, the taster is discarded and replaced with a clone of the real model, without requiring full restore. More importantly, the real model is readable while the taster is being rebuilt.