diff --git a/AsbCloudWebApi.Tests/ControllersTests/AnalyticsControllerTests.cs b/AsbCloudWebApi.Tests/ControllersTests/AnalyticsControllerTests.cs index 1b82bd74..fe386b37 100644 --- a/AsbCloudWebApi.Tests/ControllersTests/AnalyticsControllerTests.cs +++ b/AsbCloudWebApi.Tests/ControllersTests/AnalyticsControllerTests.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Security.Claims; using System.Threading; +using System.Threading.Tasks; using Xunit; namespace AsbCloudWebApi.Tests.ControllersTests @@ -38,6 +39,9 @@ namespace AsbCloudWebApi.Tests.ControllersTests wellService.Setup(s => s.IsCompanyInvolvedInWell(It.IsAny(), It.IsAny())) .Returns(true); + wellService.Setup(s => s.IsCompanyInvolvedInWellAsync(It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(Task.FromResult(true)); + controller = new TelemetryAnalyticsController(analyticsService.Object, wellService.Object); @@ -149,8 +153,8 @@ namespace AsbCloudWebApi.Tests.ControllersTests { var emptyAnalyticsService = new Mock(); - emptyAnalyticsService.Setup(s => s.GetWellDepthToDayAsync(It.IsAny(), CancellationToken.None).Result) - .Returns(value: null); + emptyAnalyticsService.Setup(s => s.GetWellDepthToDayAsync(It.IsAny(), CancellationToken.None)) + .Returns(Task.FromResult>(null)); var newControllerInstance = new TelemetryAnalyticsController(emptyAnalyticsService.Object, wellService.Object); diff --git a/ConsoleApp1/DebugWellOperationImportService.cs b/ConsoleApp1/DebugWellOperationImportService.cs index d2fe92c8..2e0a7a8a 100644 --- a/ConsoleApp1/DebugWellOperationImportService.cs +++ b/ConsoleApp1/DebugWellOperationImportService.cs @@ -21,16 +21,6 @@ namespace ConsoleApp1 { using var db = new AsbCloudDbContext(options); - var wellOperationImportService = new WellOperationImportService(db); - - //var inStream = System.IO.File.OpenRead(@"C:\temp\Миграция.xlsx"); - //wellOperationImportService.Import(1, inStream); - var stream = wellOperationImportService.Export(1); - var fs = System.IO.File.Create(@"C:\temp\2.xlsx"); - stream.CopyTo(fs); - fs.Flush(); - fs.Close(); - fs.Dispose(); Console.WriteLine("_"); } }