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