Let's go invent tomorrow instead of worrying about what happened yesterday|mail@jankowskimichal.pl

xUnit

FluentValidation.Validators.UnitTestExtension version 1.10

I just managed to publish a new version of the package FluentValidation.Validators.UnitTestExtension. This package allows you to write unit tests for Fluent Validators in a more effective way. The major change introduced in the latest version is support for FluentValidation 10. More information about the project is available on GitHub.

By |2021-08-03T20:27:50+02:003 August 2021 |Categories: Projects, Testing|Tags: , , , |0 Comments

FluentValidation.Validators.UnitTestExtension version 1.5

I just managed to publish a new version of package FluentValidation.Validators.UnitTestExtension. This package allows you to write unit tests for Fluent Validators in a more effective way. With version 1.5 following changes have been introduced: support for the new version of FluentValidation (>8.4) More information about the project is available on GitHub.

By |2019-05-12T09:45:40+02:0012 May 2019 |Categories: Projects, Testing|Tags: , , |0 Comments

FluentValidation.Validators.UnitTestExtension version 1.4

I just managed to publish a new version of package FluentValidation.Validators.UnitTestExtension. This package allows you to write unit tests for Fluent Validators in a more effective way. With version 1.4 following changes have been introduced: new verifiers that check the configuration of EnumValidator, MaxLengthValidator, MinLenghtValidator, ExactLengthValidator, ExclusiveBetweenValidator and InclusiveBetweenValidator support for .NETStandard 1.6 and .NETStandard 2.0 More information about the project is available on GitHub.

By |2018-07-01T22:23:57+02:001 July 2018 |Categories: Projects, Testing|Tags: , , , |0 Comments

FluentValidation.Validators.UnitTestExtension version 1.1

I just managed to publish new version of packgage FluentValidation.Validators.UnitTestExtension. This package allows you to write unit tests for Fluent Validators in more effective way. With version 1.1 following changes have been introduced: support for new version of FluentValidation 7.* new verifiers that check configuration of ScalePrecisionValidator and RegularExpressionValidator. More information about project is available on GitHub.

By |2017-06-04T18:35:41+02:004 June 2017 |Categories: Projects, Testing|Tags: , , , |0 Comments

FluentValidation.Validators.UnitTestExtension

I would like to introduce a new small library that I published – FluentValidation.Validators.UnitTestExtension. Main purpose of this library is to extend and simplify possibilities of testing code that is using FluentValidation package. You can install it by nuget: Install-Package FluentValidation.Validators.UnitTestExtension or download it from GithHub. One of approach of testing Fluent rules is presented in FluentValidation wiki page. You can find there information that FluentValidation comes with two extension methods ShouldHaveValidationErrorFor and ShouldNotHaveValidationErrorFor that can make it easier to write unit tests for validators. […]

Lightning talk – Autofixture

I would like to encourage you to download and go through presentation from lighting talk about AutoFixture library. Main purpose of this library is to minimize the ‘Arrange’ phase of unit tests in order to maximize maintainability. Presentation is available on GitHub – AutoFixture - Lightning talk. You will find there description of main features of this library. Moreover, presentation contains short comparison AutoFixture with other available solutions. Of course on GitHub you will find code used in presentation.

Mocking DbContext and DbSet with Moq

I believe that during your work with unit tests with applications that are using database for data storage you will need to isolate layer that is responsible for providing data. In this example I will use Entity Framework as ORM. Below you can find main elements of solution: public class User { public int Id { get; set; } public string Login { get; set; } public string Name { get; set; } public string Surname { get; set; } public bool AccountLocked { get; set; } public virtual List<Role> Roles { get; set; } } public class UsersContext [...]

By |2021-07-13T18:58:56+02:009 February 2016 |Categories: Testing|Tags: , , , , , , , |25 Comments

Moq + xUnit + AutoFixture – cheat sheet

Please find new cheat sheet that I created for following tools related to unit test: Moq, AutoFixture and xUnit. Moq - AutoFixture - xUnit - Cheat sheet page 1 Moq - AutoFixture - xUnit - Cheat sheet page 2 Provided cheat sheet is based on two articles: Moq Quickstart and AutoFixture Cheat Sheet. And the most important thing – link to .

By |2017-09-21T20:28:46+02:005 January 2016 |Categories: Testing|Tags: , , , |1 Comment
Go to Top