public void DeleteTriggerQueueService_Execute() { var serializer = new Dev2JsonSerializer(); var source = new TriggerQueueForTest(); var values = new Dictionary <string, StringBuilder> { { "TriggerQueue", source.SerializeToJsonStringBuilder() } }; var deleteTriggerQueueService = new SaveTriggerQueueService(); var jsonResult = deleteTriggerQueueService.Execute(values, null); var result = serializer.Deserialize <ExecuteMessage>(jsonResult); Assert.IsFalse(result.HasError); }
public void SaveTriggerQueueService_Execute() { var serializer = new Dev2JsonSerializer(); var source = new TriggerQueueForTest(); var values = new Dictionary <string, StringBuilder> { { "TriggerQueue", source.SerializeToJsonStringBuilder() } }; var saveTriggerQueueService = new SaveTriggerQueueService(); var jsonResult = saveTriggerQueueService.Execute(values, null); var result = serializer.Deserialize <ExecuteMessage>(jsonResult); Assert.IsFalse(result.HasError); var triggerId = Guid.Parse(result.Message.ToString()); Assert.IsTrue(triggerId != Guid.Empty); }