Exemplo n.º 1
0
            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> }"
                    );
            }
Exemplo n.º 2
0
 public void Exception_With_NullResponse()
 {
     Check.ThatCode(() => FeigTransferResult.Success(new FeigRequest(), null))
     .Throws <ArgumentNullException>();
 }