public void UpdateWebMethodScheduledCall()
        {
            // Arrange.
            const int Id = 123;
            var integrationServiceGuid = new Guid("{8EBDB6D9-42EF-437A-ABEE-2FA6987358C2}");
            const string ProcessName = "TestProcess";
            const int ItemId = 111;
            const int CallCount = 3;
            const ServiceCallStatus Status = ServiceCallStatus.Successful;
            const int ServiceDescriptionId = 222;
            const string ContractTypeName = "TestContract";
            const string MethodName = "TestMethod";
            const string Data = "TestData";

            var scheduledCall = new WebMethodScheduledCall
                                    {
                                        Id = Id,
                                        IntegrationServiceGuid = integrationServiceGuid,
                                        ProcessName = ProcessName,
                                        ItemId = ItemId,
                                        CallCount = CallCount,
                                        Status = Status,
                                        ServiceDescriptionId = ServiceDescriptionId,
                                        ContractTypeName = ContractTypeName,
                                        MethodName = MethodName,
                                        Data = Data
                                    };

            IntegrationServiceWebMethodScheduledCallDto dto = null;
            var processDal = Mock.Create<IProcessDal>();
            Mock.Arrange(() => processDal.UpdateIntegrationServiceScheduledCall(Arg.IsAny<IntegrationServiceWebMethodScheduledCallDto>()))
                .DoInstead<IntegrationServiceWebMethodScheduledCallDto>(x => dto = x);

            var scheduler = new ServiceCallScheduler { ProcessDal = processDal };

            // Act.
            scheduler.UpdateScheduledCall(scheduledCall);

            // Assert.
            Mock.Assert(() => processDal.UpdateIntegrationServiceScheduledCall(Arg.IsAny<IntegrationServiceWebMethodScheduledCallDto>()), Occurs.Once());

            Assert.IsNotNull(dto);
            Assert.AreEqual(Id, dto.Id);
            Assert.AreEqual(integrationServiceGuid, dto.IntegrationServiceGuid);
            Assert.AreEqual(ProcessName, dto.ProcessName);
            Assert.AreEqual(ItemId, dto.ItemId);
            Assert.AreEqual(CallCount, dto.CallCount);
            Assert.AreEqual(Status, dto.Status);
            Assert.AreEqual(ServiceDescriptionId, dto.ServiceDescriptionId);
            Assert.AreEqual(ContractTypeName, dto.ContractTypeName);
            Assert.AreEqual(MethodName, dto.MethodName);
            Assert.AreEqual(Data, dto.Data);
        }
        public void UpdateUrlScheduledCallTest()
        {
            // Arrange.
            const int Id = 123;
            var integrationServiceGuid = new Guid("{8EBDB6D9-42EF-437A-ABEE-2FA6987358C2}");
            const string ProcessName = "TestProcess";
            const int ItemId = 111;
            const int CallCount = 3;
            const ServiceCallStatus Status = ServiceCallStatus.Successful;
            const string Url = "http://www.example.com";
            const string Data = "TestData";

            var scheduledCall = new UrlScheduledCall
                                    {
                                        Id = Id,
                                        IntegrationServiceGuid = integrationServiceGuid,
                                        ProcessName = ProcessName,
                                        ItemId = ItemId,
                                        CallCount = CallCount,
                                        Status = Status,
                                        Url = Url,
                                        Data = Data
                                    };

            IntegrationServiceUrlScheduledCallDto dto = null;
            var processDal = Mock.Create<IProcessDal>();
            Mock.Arrange(() => processDal.UpdateIntegrationServiceScheduledCall(Arg.IsAny<IntegrationServiceUrlScheduledCallDto>())).DoInstead<IntegrationServiceUrlScheduledCallDto>(x => dto = x);

            var scheduler = new ServiceCallScheduler { ProcessDal = processDal };

            // Act.
            scheduler.UpdateScheduledCall(scheduledCall);

            // Assert.
            Mock.Assert(() => processDal.UpdateIntegrationServiceScheduledCall(Arg.IsAny<IntegrationServiceUrlScheduledCallDto>()), Occurs.Once());

            Assert.IsNotNull(dto);
            Assert.AreEqual(Id, dto.Id);
            Assert.AreEqual(integrationServiceGuid, dto.IntegrationServiceGuid);
            Assert.AreEqual(ProcessName, dto.ProcessName);
            Assert.AreEqual(ItemId, dto.ItemId);
            Assert.AreEqual(CallCount, dto.CallCount);
            Assert.AreEqual(Status, dto.Status);
            Assert.AreEqual(Url, dto.Url);
            Assert.AreEqual(Data, dto.Data);
        }