Esempio n. 1
0
            public void Success()
            {
                // act
                var request = new FeigRequest();
                var result  = FeigTransferResult.CommunicationError(request);

                // assert
                Check.That(result.Status).IsEqualTo(FeigTransferStatus.CommunicationError);
                Check.That(result.Request).IsSameReferenceAs(request);
                Check.That(result.Response).IsNull();

                Check.That(result.ToString())
                .IsEqualTo(
                    "Status: CommunicationError, Request: { Address: 255, Command: None, Data: <empty> }, Response: { <null> }"
                    );
            }
Esempio n. 2
0
 public void Exception_With_NullRequest()
 {
     Check.ThatCode(() => FeigTransferResult.CommunicationError(null)).Throws <ArgumentNullException>();
 }