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