diff --git a/Docs/pages/00-index.md b/Docs/pages/00-index.md index 584a739d..c57c9d20 100644 --- a/Docs/pages/00-index.md +++ b/Docs/pages/00-index.md @@ -14,12 +14,18 @@ Framework 4.8. ## Getting Started -1. Install the [`Mockolate`](https://www.nuget.org/packages/Mockolate) nuget package +1. Check prerequisites + Although Mockolate supports multiple .NET Standard 2.0 compatible frameworks (including .NET Framework 4.8), you must + have the [.NET 10 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) installed to build and compile + Mockolate. This is required because Mockolate + leverages [C# 14 extension members](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods#declare-extension-members). + +2. Install the [`Mockolate`](https://www.nuget.org/packages/Mockolate) nuget package ```ps dotnet add package Mockolate ``` -2. Create and use the mock +3. Create and use the mock ```csharp using Mockolate; diff --git a/README.md b/README.md index d59ccfa6..109c23b8 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,8 @@ [![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FaweXpect%2FMockolate%2Fmain)](https://dashboard.stryker-mutator.io/reports/github.com/aweXpect/Mockolate/main) **Mockolate** is a modern, strongly-typed, AOT-compatible mocking library for .NET, powered by source generators. It -enables fast, -compile-time validated mocks for interfaces and classes, supporting .NET Standard 2.0, .NET 8, .NET 10, and .NET -Framework 4.8. +enables fast, compile-time validated mocks for interfaces and classes, supporting .NET Standard 2.0, .NET 8, .NET 10, +and .NET Framework 4.8. - **Source generator-based**: No runtime proxy generation, fast and reliable. - **Strongly-typed**: Setup and verify mocks with full IntelliSense and compile-time safety. @@ -19,12 +18,18 @@ Framework 4.8. ## Getting Started -1. Install the [`Mockolate`](https://www.nuget.org/packages/Mockolate) nuget package +1. Check prerequisites + Although Mockolate supports multiple .NET Standard 2.0 compatible frameworks (including .NET Framework 4.8), you must + have the [.NET 10 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) installed to build and compile + Mockolate. This is required because Mockolate + leverages [C# 14 extension members](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods#declare-extension-members). + +2. Install the [`Mockolate`](https://www.nuget.org/packages/Mockolate) nuget package ```ps dotnet add package Mockolate ``` -2. Create and use the mock +3. Create and use the mock ```csharp using Mockolate; @@ -140,8 +145,8 @@ var classMock = Mock.Create( - You can provide custom default values for specific types using `.WithDefaultValueFor()`: ```csharp var behavior = MockBehavior.Default - .WithDefaultValueFor(() => "default") - .WithDefaultValueFor(() => 42); + .WithDefaultValueFor(() => "default") + .WithDefaultValueFor(() => 42); var sut = Mock.Create(behavior); ``` This is useful when you want mocks to return specific default values for certain types instead of the standard