コード例 #1
0
 public void ExceptionNull(
     string reason,
     ISpecimenContext context,
     ErrorResponseBuilder sut)
 {
     context.MockToReturn(reason);
     ((ErrorResponse)sut.Create(typeof(ErrorResponse), context))
     .Exception.Should().BeNull();
 }
コード例 #2
0
 public void QueriesContextForReason(
     string reason,
     ISpecimenContext context,
     ErrorResponseBuilder sut)
 {
     context.MockToReturn(reason);
     ((ErrorResponse)sut.Create(typeof(ErrorResponse), context))
     .Reason.Should().Be(reason);
 }
コード例 #3
0
 public void ReturnsErrorResponse(
     string reason,
     ISpecimenContext context,
     ErrorResponseBuilder sut)
 {
     context.MockToReturn(reason);
     sut.Create(typeof(ErrorResponse), context)
     .Should().BeOfType <ErrorResponse>();
 }
コード例 #4
0
 public void ReturnsSuccessful(
     string reason,
     ISpecimenContext context,
     ErrorResponseBuilder sut)
 {
     context.MockToReturn(reason);
     ((ErrorResponse)sut.Create(typeof(ErrorResponse), context))
     .Succeeded.Should().BeTrue();
 }
コード例 #5
0
 public void UnrelatedTypeReturnsNoSpecimen(
     string reason,
     ISpecimenContext context,
     ErrorResponseBuilder sut)
 {
     context.MockToReturn(reason);
     sut.Create(typeof(string), context)
     .Should().BeOfType <NoSpecimen>();
 }