Kimono 0.0.1-RC01
See the version list below for details.
dotnet add package Kimono --version 0.0.1-RC01
NuGet\Install-Package Kimono -Version 0.0.1-RC01
<PackageReference Include="Kimono" Version="0.0.1-RC01" />
paket add Kimono --version 0.0.1-RC01
#r "nuget: Kimono, 0.0.1-RC01"
// Install Kimono as a Cake Addin #addin nuget:?package=Kimono&version=0.0.1-RC01&prerelease // Install Kimono as a Cake Tool #tool nuget:?package=Kimono&version=0.0.1-RC01&prerelease
Overmock
Overmock is a mocking framework in development that allows for creating dynamic proxies that monitor and control expected behavior when writing unit tests. Here are some examples below.
The current goal is refactoring out the dynamic proxy creation into it's own class library to be used by the testing framework.
[TestClass]
public class ExampleTestsForReadMe
{
public class Model
{
public int Id { get; set; }
}
public interface IRepository
{
bool Save(Model model);
}
public interface ILog
{
void Log(string message);
}
public class Service
{
private readonly ILog _log;
private readonly IRepository _repo;
public Service(ILog log, IRepository repo)
{
_log = log;
_repo = repo;
}
public void SaveModel(Model model)
{
try
{
var saved = _repo.Save(model);
if (!saved)
{
_log.Log("Failed to save");
}
}
catch (Exception ex)
{
_log.Log(ex.Message);
throw;
}
}
}
[TestMethod]
public void CallsSaveTest()
{
var id = 22;
var wasSaved = false;
var log = Overmocked.ExpectAnyInvocation<ILog>();
var repository = Overmocked.Interface<IRepository>();
repository.Override(r => r.Save(Its.Any<Model>())).ToCall(c =>
{
wasSaved = true;
return c.Get<Model>("model")?.Id == id;
}, Times.Once);
var service = new Service(log.Target, repository.Target);
service.SaveModel(new Model { Id = id });
Assert.IsTrue(wasSaved);
}
[TestMethod]
public void ThrowsExceptionWhenSaveFailsTest()
{
var expected = "Failed to save";
var log = Overmocked.ExpectAnyInvocation<ILog>();
var repository = Overmocked.Interface<IRepository>();
repository.Override(r => r.Save(Its.Any<Model>())).ToThrow(new Exception(expected));
var service = new Service(log.Target, repository.Target);
try
{
service.SaveModel(new Model());
Assert.Fail("SaveModel Failed to throw an exception.");
}
catch (Exception actual)
{
Assert.AreEqual(expected, actual.Message);
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net7.0
- IFluentInterface (>= 2.1.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Kimono:
Package | Downloads |
---|---|
Overmock
Overmock is a mocking framework that allows for very robust mocking configuration and validation. |
|
Kimono.Extensions.DependencyInjection
Kimono.Extensions.DependencyInjection contains extension methods for adding of interceptors to DI. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.1 | 202 | 8/15/2024 |
0.1.0 | 185 | 8/9/2024 |
0.0.12 | 330 | 3/27/2024 |
0.0.11-RC01 | 257 | 10/16/2023 |
0.0.10 | 202 | 10/11/2023 |
0.0.9 | 210 | 9/17/2023 |
0.0.9-RD01 | 179 | 8/28/2023 |
0.0.9-RC03 | 150 | 9/15/2023 |
0.0.9-RC02 | 173 | 8/30/2023 |
0.0.8 | 229 | 8/27/2023 |
0.0.7 | 203 | 8/27/2023 |
0.0.7-RC05 | 114 | 8/25/2023 |
0.0.7-RC04 | 143 | 8/24/2023 |
0.0.7-RC03 | 146 | 8/22/2023 |
0.0.7-RC02 | 136 | 8/19/2023 |
0.0.7-RC01 | 140 | 8/16/2023 |
0.0.6 | 186 | 8/15/2023 |
0.0.6-RC01 | 145 | 8/14/2023 |
0.0.5 | 180 | 8/14/2023 |
0.0.4 | 195 | 8/13/2023 |
0.0.3 | 183 | 8/13/2023 |
0.0.1 | 188 | 8/13/2023 |
0.0.1-RC03 | 152 | 8/13/2023 |
0.0.1-RC02 | 149 | 8/13/2023 |
0.0.1-RC01 | 161 | 8/11/2023 |
This is a first release and is meant for internal usages until further notice.