public void Get_DefaultTicketIntegration_ShouldReturnDefaultIntegration() { var integration = TicketingFactory.GetTicketingIntegrator(); Assert.IsNotNull(integration); Assert.AreEqual(typeof(DefaultTicketIntegration).FullName, integration.GetType().FullName); }
public TicketingService(DiscordSocketClient discord, CommandService commands, PrivateMessageHandler pmHandler) { _discord = discord; _commands = commands; _ticketResponders = new Dictionary <ulong, Responder>(); _factory = new TicketingFactory(); _pmHandler = pmHandler; _discord.ChannelCreated += OnChannelCreated; }
private static void HandleOptions(Options options) { string versionFormat = null; if (ConfigurationManager.AppSettings.AllKeys.Contains("VersionFormat")) { versionFormat = ConfigurationManager.AppSettings["VersionFormat"]; } if (!options.Verbose) { Trace.Listeners.Clear(); } GitInformation info = new GitInformation(options.RepositoryPath, GitSortStrategy.Reverse | GitSortStrategy.Time); if (!string.IsNullOrEmpty(options.Tag)) { Version specificVersion; if (Version.TryParse(options.Tag, out specificVersion)) { info.SpecificTag = specificVersion; } } info.GetRepositoryInformation(); var preparer = MessagePrepareFactory.GetMessagePreparer(); var logs = preparer.PrepareMessages(info).ToList(); var ticketIntegrator = TicketingFactory.GetTicketingIntegrator(options.TicketingTool); var tickets = ticketIntegrator.CombineLogsWithTicketing(logs); var exporter = LogExporterFactory.GetLogExporter("markdown"); var val = exporter.GetExportValue(tickets, options.LinkTickets, versionFormat); File.WriteAllText(options.ExportFileName, val); }
public void Get_UndefinedTicketIntegration_ShouldReturnNull() { var integration = TicketingFactory.GetTicketingIntegrator("SuperDefactSystem"); Assert.IsNull(integration); }