This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Website.Domain; | |
namespace Website.Domain.Customers | |
{ | |
public class ContactRegistrationService : IRegisterContactCommandHandler, IActivateExistingContactCommandHandler | |
{ | |
private readonly ITransactionProvider _transactor; | |
private readonly ISelfRegistrationValidator _validator; | |
private readonly ICompanyRepository _companyRepo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PDF document from our internal wiki, explaining the WHY's and HOW's | |
https://www.dropbox.com/s/6vjkv6qysahzcih/apiTests.pdf?dl=0 | |
COMPONENTS USED TO FACILITATE THIS KIND OF TESTING | |
IIS Express instrumentation | |
https://gist.github.com/JulianMay/5d73c1708186532b61751b6e1b7e023e | |
Assertion DSL (chaining expextations for API responses) | |
https://gist.github.com/JulianMay/ef3d367a22829181e42a179fa97ce51f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SetUpFixture] //NUnit's "before all tests" | |
public class SystemTestInit | |
{ | |
private IISExpress iis; | |
[SetUp] | |
public void Init() | |
{ | |
if (iis != null) | |
throw new InvalidOperationException("IIS express is already configured!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using NUnit.Framework; | |
using RestSharp; | |
namespace ProjectName.Tests.System | |
{ | |
public class CompositeResponseAssert : IResponseAssert | |
{ | |
private readonly ResponseAssert[] _responses; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Newtonsoft.Json; | |
using System.Text; | |
namespace ProjectName.Tests.System.json | |
{ | |
public class JsonComparer | |
{ |