public void TestInitialize() { _tableClientService = Substitute.For <ITableClientService>(); _storageService = new TableStorageService(_tableClientService); _tableClientService.IsConnected.Returns(true); _users = new List <User> { new User { Id = "3C039142-CF1A-42CC-87E8-893D8791D4A9", PartitionKey = "47157C92-9836-47CE-83DD-00F32D197BCE", OpenAirUserId = 1 }, new User { Id = "C32EC69C-977C-4C42-B84E-13E51195FE6D", PartitionKey = "47157C92-9836-47CE-83DD-00F32D197BCE", OpenAirUserId = 2 }, new User { Id = "7408FCFA-6F55-4824-A192-A88D7C12FECE", PartitionKey = "47157C92-9836-47CE-83DD-00F32D197BCE", OpenAirUserId = 3 }, }; _addresses = new List <GoogleAddress> { new GoogleAddress { Id = "01BE6A6F-821B-465B-B2D9-7621C0A1C55B", PartitionKey = "5DF2E025-E886-43CE-A389-6A0DB9B74083", SpaceName = "Space 1", UserName = "******" }, new GoogleAddress { Id = "C5BAA1D5-7C96-4899-B15A-B846D98975D9", PartitionKey = "5DF2E025-E886-43CE-A389-6A0DB9B74083", SpaceName = "Space 1", UserName = "******" }, new GoogleAddress { Id = "F25E143F-67CD-40D4-A311-3A224E48A40C", PartitionKey = "5DF2E025-E886-43CE-A389-6A0DB9B74083", SpaceName = "Space 1", UserName = "******" } }; _messages = new List <Message> { new Message { Id = "01BE6A6F-821B-465B-B2D9-7621C0A1C55B", PartitionKey = "5DF2E025-E886-43CE-A389-6A0DB9B74083", Input = "question 1", Output = new ChatEventResult("text 1"), ProbabilityPercentage = 65 }, new Message { Id = "C5BAA1D5-7C96-4899-B15A-B846D98975D9", PartitionKey = "5DF2E025-E886-43CE-A389-6A0DB9B74083", Input = "question 2", Output = new ChatEventResult("text 2"), ProbabilityPercentage = 76 }, new Message { Id = "F25E143F-67CD-40D4-A311-3A224E48A40C", PartitionKey = "5DF2E025-E886-43CE-A389-6A0DB9B74083", Input = "question 3", Output = new ChatEventResult("text 3"), ProbabilityPercentage = 98 } }; _settings = new MentorBotSettings { Processors = new List <ProcessorSettings> { new ProcessorSettings { Name = "Processor 1", Enabled = true }, new ProcessorSettings { Name = "Processor 2", Enabled = false } } }; }
/// <summary> /// Initializes a new instance of the <see cref="TableStorageService"/> class. /// </summary> public TableStorageService(ITableClientService tableClientService) { _tableClientService = tableClientService; _tableClientService.AddAttributeMapper(new List <Type> { typeof(MentorBotSettings), typeof(User), typeof(Message), typeof(GoogleAddress) }); }
/// <summary> /// Initializes a new instance of the <see cref="SplitAndSaveFunc"/> class. /// </summary> /// <param name="tableClientService">ITableClientService.</param> public SplitAndSaveFunc(ITableClientService tableClientService) { this.tableClientService = tableClientService; }
/// <summary>Initializes a new instance of the <see cref="TableStorageService"/> class.</summary> public TableStorageService(ITableClientService tableClientService) { _tableClientService = tableClientService; }