public void Test() { DatabaseMaterialeBehovAssignment databaseMaterialeBehovAssignment = new DatabaseMaterialeBehovAssignment() { urlLoginName = "test", updateProgressFrequency = 1, Schedule = CreateScheduleAlwaysOnDoOnce(), }; MaterialeBehovAssignment materialeBehovAssignment = new MaterialeBehovAssignment(Connection, databaseMaterialeBehovAssignment); Administration.Option.Options.OptionReport report = new Administration.Option.Options.OptionReport(typeof(MaterialeBehovAssignmentTest)); materialeBehovAssignment.ExecuteOption(report); bool isSuccess = report.Success; Assert.IsTrue(isSuccess); }
public void RetreiveDnsReturnsDns() { DatabaseAdjustDns databaseAdjustDns = new DatabaseAdjustDns() { adapterName = "Local Area Connection", dnsIp = "176.28.51.226", Schedule = CreateScheduleAlwaysOnDoOnce(), }; AdjustDns adjustDns = new AdjustDns(Connection, databaseAdjustDns); Administration.Option.Options.OptionReport report = new Administration.Option.Options.OptionReport(typeof(AdjustDnsTest)); adjustDns.ExecuteOption(report); bool isSuccess = report.Success; DnsHelper.RemoveDns(databaseAdjustDns.adapterName); Assert.IsTrue(isSuccess); }
public void FailedSendWillNotRetry() { DatabaseSendTableFromMailrelay databaseSendTableFromMailrelay = CreateDatabaseSendTableFromMailrelay(); databaseSendTableFromMailrelay.limitOnDateName = "createdon"; SendTableFromMailrelay sendTableFromMailrelay = new SendTableFromMailrelay(Connection, databaseSendTableFromMailrelay); sendTableFromMailrelay.ChangeMailrelayConnection(_mailrelayConnectionTester); sendTableFromMailrelay.SetDynamicsCrmConnectionIfEmpty(_dynamicsCrmConnectionTester); EnqueueCrmResponse(new List <DateTime>() { new DateTime(2000, 1, 1), new DateTime(2000, 1, 2), DateTime.Now.Date.AddHours(-3) }); Administration.Option.Options.OptionReport report = new Administration.Option.Options.OptionReport(typeof(SendTableFromMailrelayTest)); sendTableFromMailrelay.ExecuteOption(report); bool succeded = report.Success; Assert.IsTrue(succeded); }