示例#1
0
        public void DereferencePatientInContactCommand_Execute_Success()
        {
            var mockContactEndPointUtil = new Mock <IContactEndpointUtil>();

            mockContactEndPointUtil.Setup(
                mcep =>
                mcep.DereferencePatientInContact(It.IsAny <string>(), It.IsAny <double>(), It.IsAny <string>(),
                                                 It.IsAny <string>())).Returns(new DereferencePatientDataResponse());


            var command = new DereferencePatientInContactCommand("someId", new PostDeletePatientRequest(), mockContactEndPointUtil.Object);

            command.Execute();

            mockContactEndPointUtil.Verify(c => c.DereferencePatientInContact(It.IsAny <string>(), It.IsAny <double>(), It.IsAny <string>(),
                                                                              It.IsAny <string>()), Times.Once);
        }
示例#2
0
        public void DereferencePatientInContactCommand_Null_Request_Should_Throw()
        {
            var command = new DereferencePatientInContactCommand("someId", null, new ContactEndpointUtil());

            command.Execute();
        }
示例#3
0
        public void DereferencePatientInContactCommand_Null_ContactEndPointUtil_Should_Throw()
        {
            var command = new DereferencePatientInContactCommand("someId", new PostDeletePatientRequest(), null);

            command.Execute();
        }
示例#4
0
        public void DereferencePatientInContactCommand_Null_Contact_Should_Throw()
        {
            var command = new DereferencePatientInContactCommand(null, new PostDeletePatientRequest(), new ContactEndpointUtil());

            command.Execute();
        }