LucidCode 0.3.3
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package LucidCode --version 0.3.3
NuGet\Install-Package LucidCode -Version 0.3.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LucidCode" Version="0.3.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LucidCode --version 0.3.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LucidCode, 0.3.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LucidCode as a Cake Addin #addin nuget:?package=LucidCode&version=0.3.3 // Install LucidCode as a Cake Tool #tool nuget:?package=LucidCode&version=0.3.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LucidCode
LucidCode is a library dedicated to improving code readability.
Extensions
- In - Returns true if object is in collection
- IsNotNull - Returns true if object is not null
- IsNull - Returns true if object is null
- NotIn - Returns true if object is not in collection
LucidTest - Arrange Act Assert pattern
Arrange Act Assert pattern (AAA) is a very powerful pattern for writing tests. The AAA implementation is usually done by adding comments in the test code:
private readonly INameProvider _nameProvider = Substitute.For<INameProvider>();
[Fact]
public void Test_NameProvider()
{
// Arrange
const string ExpectedName = "FakeName";
const int UserId = 10;
_nameProvider.GetUserName(UserId).Returns(ExpectedName);
// Act
var userName = _nameProvider.GetUserName(UserId);
// Assert
userName.ShouldBe(ExpectedName);
}
Next good pattern is to avoid comments by writing readable and self-explanable code. What if both patterns could be combined? Here is LucidTest example of such approach:
private readonly INameProvider _nameProvider = Substitute.For<INameProvider>();
[Fact]
public void Test_NameProvider() =>
LucidTest.DefineExpected("FakeName")
.Arrange(name =>
{
const int UserId = 10;
_nameProvider.GetUserName(UserId).Returns(name);
return UserId;
})
.Act(userId => _nameProvider.GetUserName(userId))
.Assert((expected, result) => result.ShouldBe(expected));
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.5.1 | 16,632 | 5/15/2020 |
0.5.0 | 1,024 | 1/26/2020 |
0.3.8 | 1,074 | 1/25/2020 |
0.3.7 | 1,088 | 9/27/2019 |
0.3.6 | 1,403 | 3/11/2019 |
0.3.5 | 1,523 | 2/6/2019 |
0.3.4 | 1,513 | 2/6/2019 |
0.3.3 | 1,471 | 1/21/2019 |
0.3.2 | 1,493 | 1/8/2019 |
0.3.1 | 1,503 | 12/14/2018 |
0.3.0 | 1,497 | 12/13/2018 |
0.2.1 | 1,532 | 12/4/2018 |
0.2.0 | 1,498 | 12/3/2018 |
0.1.3 | 1,571 | 10/27/2018 |
0.1.2 | 1,506 | 10/26/2018 |
0.1.1 | 1,489 | 10/25/2018 |
0.1.0 | 1,522 | 10/24/2018 |
0.0.1 | 1,517 | 10/20/2018 |