public void Success_With_Response() { // act var request = new FeigRequest(); var response = new FeigResponse(); var result = FeigTransferResult.Success(request, response); // assert Check.That(result.Status).IsEqualTo(FeigTransferStatus.Success); Check.That(result.Request).IsSameReferenceAs(request); Check.That(result.Response).IsSameReferenceAs(response); Check.That(result.ToString()) .IsEqualTo( "Status: Success, Request: { Address: 255, Command: None, Data: <empty> }, Response: { Address: 0, Command: None, Status: OK, Data: <empty> }" ); }
public void Exception_With_NullResponse() { Check.ThatCode(() => FeigTransferResult.Success(new FeigRequest(), null)) .Throws <ArgumentNullException>(); }