Search posts:
Categories
- ASP.NET (2)
- Documentation (6)
- F# (1)
- object-oriented-principles (1)
- programming (1)
- Selenium (2)
- software-patterns (1)
- SpecFlow (1)
- SysInternals (1)
- Uncategorized (2)
- Unit test (4)
- VS 2013 tips (1)
- WEB API (6)
- XML (1)
Archieves
- November 2019 (1)
- June 2019 (1)
- January 2018 (1)
- November 2017 (4)
- October 2017 (1)
- November 2016 (2)
- September 2016 (1)
- May 2016 (1)
- April 2016 (1)
- March 2016 (2)
- September 2015 (1)
- June 2015 (2)
- December 2014 (2)
Blogs I Follow
Top Posts & Pages
Author Archives: Alexander
ApprovalTests > Customize output file names
By default ApprovalTests generate output file to the same location where test class resides, with the file name as ClassType.MethodName. This behaviour is configured in `UnitTestFrameworkNamer` class, that is default namer for ApprovalTests. Long test names issue Tests are usually … Continue reading
Generate WinMerge report file on CI server when running Approval tests
In our automation tests projects we rely on Approval tests to assert test output files. It could be for example JSON API responses or XML messages generated by integration services. This approach worked very well for us, in local when … Continue reading
ASP.NET WEB API documentation using Swagger – Global operation for 500 response code
Some api response codes, such as 500 for Internal server error, are the same for all API endpoints. Let’s see how to implement such general behaviour using Swashbuckle. Add below classes: Register new operation filter in SwaggerConfig.cs And after running … Continue reading
ASP.NET WEB API documentation using Swagger – Extend schema generation using SchemaFilters and FluentValidation rules
In this post we will see how to extend schema generation using FluentValidation rules. We will see how to display min/max constraints for Integer type in Swagger UI and how to extend default examples to show valid email for email attribute.To … Continue reading
ASP.NET Web API documentation using Swagger – Useful links
Some of good additions to Swagger might be quite difficult to find so I put useful links here: Generating model examples: https://mattfrear.com/2015/04/21/generating-swagger-example-responses-with-swashbuckle #1 https://mattfrear.com/2016/01/25/generating-swagger-example-requests-with-swashbuckle #2 https://github.com/mattfrear/Swashbuckle.Examples Using markdown in descriptions: It is possible to render really cool description in Swagger … Continue reading
ASP.NET Web API documentation using Swagger – Use schema mapper for generic data types
If get back to previous post, you could see that descriptions for StartDate and EndDate are duplicated. DateTime description shall be consistent across all API, so to not repeat yourself let’s use MapType feature of Swashbuckle configuration. Open SwaggerConfig and … Continue reading
ASP.NET Web API documentation using Swagger – Add custom headers
In this post, we will look into how to add custom headers to your Swagger documentation using Swashbuckle. We will add well-known “Accept-Language” header with conditionally visibility based on API method! Setup application culture based on Accept-Language header First, add … Continue reading
ASP.NET Web API documentation using Swagger – Introduction
Providing always up-to-date and exhaustive documentation for your WEB API could be quite a challenging task. Swagger and Swashbuckle did a great job to provide uniform documentation for any kind of API. Let’s look into this using simple demo discount API example. … Continue reading
AutoFixture > Using [Frozen] attribute on test method parameter
[Frozen] attribute is used to freeze instances of objects. It is applied on test method parameters. We will consider simple examples with string comparison test. Without [Frozen] attribute Result: Failed Using [Frozen] attribute Applying [Frozen] on the first parameter of type … Continue reading
AutoFixture > Customize objects creation with ICustomization interface
In this post we will look at AutoFixture basic customization features starting with ICustomization interface. We will use following DateRange class as demonstration example. If we write test method using DateRange as parameter: Test will sometimes fail with “System.ArgumentExceptionFinish date … Continue reading