From 793d4c00ee121c8e8bf0b902c2407b304f00208a Mon Sep 17 00:00:00 2001 From: BohdanBybliv <125794488+BohdanBybliv@users.noreply.github.com> Date: Sun, 7 Jan 2024 20:07:18 +0200 Subject: [PATCH] Revert "Integration tests for Streetcode Update Controller" --- .../GetCount/GetStreetcodesCountHander.cs | 23 +- .../GetCount/GetStreetcodesCountQuery.cs | 2 +- .../Entities/Streetcode/StreetcodeContent.cs | 2 +- ...0231130202258_DatestringLength.Designer.cs | 1595 ----------------- .../20231130202258_DatestringLength.cs | 37 - .../StreetcodeDbContextModelSnapshot.cs | 4 +- .../Streetcode/StreetcodeController.cs | 4 +- .../CoordinateControllerTests.cs | 12 +- .../AdditionalContent/TagControllerTests.cs | 19 +- .../ControllerTests/BaseControllerTests.cs | 13 +- .../Media/AudioControllerTests.cs | 1 + .../Images/StreetcodeArtControllerTests.cs | 10 +- .../Media/VideoControllerTests.cs | 9 +- .../ExtractTestStreetcodeCoordinate.cs | 16 +- .../ExtractTestToponymCoordinate.cs | 7 +- .../Subtitle/ExtractTestSubtitle.cs | 13 +- .../AdditionalContent/Tag/ExtractTestTag.cs | 5 +- .../Tag/StreetcodeTagIndexSetup.cs | 5 + .../Media/Images/Art/ExtractTestArt.cs | 2 +- .../Media/Images/Image/ExtractTestImage.cs | 2 +- .../StreetcodeArt/ExtractTestStreetcodeArt.cs | 4 +- .../Media/Video/ExtractTestVideo.cs | 2 +- .../Partners/ExtractTestPartners.cs | 7 +- .../ExtractTestSourceLinkCategory.cs | 10 +- .../Streetcode/ExtractTestStreetcode.cs | 24 +- .../RelatedFigure/ExtractTestRelatedFigure.cs | 7 +- .../TextContent/Facts/ExtractTestFact.cs | 7 +- .../TextContent/Terms/ExstractTestTerm.cs | 8 +- .../TextContent/Texts/ExstractTestText.cs | 7 +- .../Timelines/ExtractTestTimelineItem.cs | 7 +- .../Toponyms/ExtractTestToponym.cs | 5 +- .../ExtractTestTransactionLink.cs | 9 +- .../Utils/CustomWebApplicationFactory.cs | 2 +- .../ControllerTests/Utils/SqlDbHelper.cs | 6 - .../ControllerTests/Utils/StreetcodeClient.cs | 23 +- .../Utils/BlobStorageFixture.cs | 6 +- 36 files changed, 157 insertions(+), 1758 deletions(-) delete mode 100644 Streetcode/Streetcode.DAL/Persistence/Migrations/20231130202258_DatestringLength.Designer.cs delete mode 100644 Streetcode/Streetcode.DAL/Persistence/Migrations/20231130202258_DatestringLength.cs diff --git a/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetCount/GetStreetcodesCountHander.cs b/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetCount/GetStreetcodesCountHander.cs index bc5b679af..d9405bd15 100644 --- a/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetCount/GetStreetcodesCountHander.cs +++ b/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetCount/GetStreetcodesCountHander.cs @@ -1,11 +1,16 @@ -using AutoMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using AutoMapper; using FluentResults; using MediatR; using Microsoft.Extensions.Localization; +using Streetcode.BLL.DTO.Streetcode; using Streetcode.BLL.Interfaces.Logging; +using Streetcode.BLL.MediatR.Streetcode.Streetcode.GetAllShort; using Streetcode.BLL.SharedResource; -using Streetcode.DAL.Entities.Streetcode; -using Streetcode.DAL.Enums; using Streetcode.DAL.Repositories.Interfaces.Base; namespace Streetcode.BLL.MediatR.Streetcode.Streetcode.GetCount @@ -26,17 +31,7 @@ public GetStreetcodesCountHander(IRepositoryWrapper repositoryWrapper, IMapper m public async Task> Handle(GetStreetcodesCountQuery request, CancellationToken cancellationToken) { - IEnumerable streetcodes; - - if (request.onlyPublished) - { - streetcodes = await _repositoryWrapper.StreetcodeRepository - .GetAllAsync(s => s.Status == StreetcodeStatus.Published); - } - else - { - streetcodes = await _repositoryWrapper.StreetcodeRepository.GetAllAsync(); - } + var streetcodes = await _repositoryWrapper.StreetcodeRepository.GetAllAsync(); if (streetcodes != null) { diff --git a/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetCount/GetStreetcodesCountQuery.cs b/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetCount/GetStreetcodesCountQuery.cs index 8fb88e9dc..0f8262151 100644 --- a/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetCount/GetStreetcodesCountQuery.cs +++ b/Streetcode/Streetcode.BLL/MediatR/Streetcode/Streetcode/GetCount/GetStreetcodesCountQuery.cs @@ -3,5 +3,5 @@ namespace Streetcode.BLL.MediatR.Streetcode.Streetcode.GetCount { - public record GetStreetcodesCountQuery(bool onlyPublished) : IRequest>; + public record GetStreetcodesCountQuery : IRequest>; } diff --git a/Streetcode/Streetcode.DAL/Entities/Streetcode/StreetcodeContent.cs b/Streetcode/Streetcode.DAL/Entities/Streetcode/StreetcodeContent.cs index e71306ebc..4514ce82a 100644 --- a/Streetcode/Streetcode.DAL/Entities/Streetcode/StreetcodeContent.cs +++ b/Streetcode/Streetcode.DAL/Entities/Streetcode/StreetcodeContent.cs @@ -32,7 +32,7 @@ public class StreetcodeContent public string? Teaser { get; set; } [Required] - [MaxLength(100)] + [MaxLength(50)] public string? DateString { get; set; } [MaxLength(50)] diff --git a/Streetcode/Streetcode.DAL/Persistence/Migrations/20231130202258_DatestringLength.Designer.cs b/Streetcode/Streetcode.DAL/Persistence/Migrations/20231130202258_DatestringLength.Designer.cs deleted file mode 100644 index 7cfdfffaa..000000000 --- a/Streetcode/Streetcode.DAL/Persistence/Migrations/20231130202258_DatestringLength.Designer.cs +++ /dev/null @@ -1,1595 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Streetcode.DAL.Persistence; - -#nullable disable - -namespace Streetcode.DAL.Persistence.Migrations -{ - [DbContext(typeof(StreetcodeDbContext))] - [Migration("20231130202258_DatestringLength")] - partial class DatestringLength - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .UseCollation("SQL_Ukrainian_CP1251_CI_AS") - .HasAnnotation("ProductVersion", "6.0.11") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.Coordinates.Coordinate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("CoordinateType") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Latitude") - .HasColumnType("decimal(18,4)"); - - b.Property("Longtitude") - .HasColumnType("decimal(18,4)"); - - b.HasKey("Id"); - - b.ToTable("coordinates", "add_content"); - - b.HasDiscriminator("CoordinateType").HasValue("coordinate_base"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.StreetcodeTagIndex", b => - { - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.Property("TagId") - .HasColumnType("int"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("IsVisible") - .HasColumnType("bit"); - - b.HasKey("StreetcodeId", "TagId"); - - b.HasIndex("TagId"); - - b.ToTable("streetcode_tag_index", "add_content"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.Subtitle", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.Property("SubtitleText") - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.HasKey("Id"); - - b.HasIndex("StreetcodeId"); - - b.ToTable("subtitles", "add_content"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.Tag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Title") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.ToTable("tags", "add_content"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Analytics.StatisticRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Address") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("Count") - .HasColumnType("int"); - - b.Property("QrId") - .HasColumnType("int"); - - b.Property("StreetcodeCoordinateId") - .HasColumnType("int"); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("StreetcodeCoordinateId") - .IsUnique(); - - b.HasIndex("StreetcodeId"); - - b.ToTable("qr_coordinates", "coordinates"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Feedback.Response", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("Name") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.ToTable("responses", "feedback"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Jobs.Job", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Description") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); - - b.Property("Salary") - .IsRequired() - .HasMaxLength(15) - .HasColumnType("nvarchar(15)"); - - b.Property("Status") - .HasColumnType("bit"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(65) - .HasColumnType("nvarchar(65)"); - - b.HasKey("Id"); - - b.ToTable("job", "jobs"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Audio", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("BlobName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("MimeType") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); - - b.Property("Title") - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.HasKey("Id"); - - b.ToTable("audios", "media"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Images.Art", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Description") - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("ImageId") - .HasColumnType("int"); - - b.Property("Title") - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.HasKey("Id"); - - b.HasIndex("ImageId") - .IsUnique(); - - b.ToTable("arts", "media"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Images.Image", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("BlobName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("MimeType") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); - - b.HasKey("Id"); - - b.ToTable("images", "media"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Images.ImageDetails", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Alt") - .HasMaxLength(300) - .HasColumnType("nvarchar(300)"); - - b.Property("ImageId") - .HasColumnType("int"); - - b.Property("Title") - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("ImageId") - .IsUnique(); - - b.ToTable("image_details", "media"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Images.StreetcodeImage", b => - { - b.Property("ImageId") - .HasColumnType("int"); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.HasKey("ImageId", "StreetcodeId"); - - b.HasIndex("StreetcodeId"); - - b.ToTable("streetcode_image", "streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Video", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.Property("Title") - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("Url") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("StreetcodeId"); - - b.ToTable("videos", "media"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.News.News", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("ImageId") - .HasColumnType("int"); - - b.Property("Text") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("URL") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("ImageId") - .IsUnique() - .HasFilter("[ImageId] IS NOT NULL"); - - b.HasIndex("URL") - .IsUnique(); - - b.ToTable("news", "news"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Partners.Partner", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Description") - .HasMaxLength(600) - .HasColumnType("nvarchar(600)"); - - b.Property("IsKeyPartner") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("IsVisibleEverywhere") - .HasColumnType("bit"); - - b.Property("LogoId") - .HasColumnType("int"); - - b.Property("TargetUrl") - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.Property("UrlTitle") - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.HasKey("Id"); - - b.HasIndex("LogoId") - .IsUnique(); - - b.ToTable("partners", "partners"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Partners.PartnerSourceLink", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("LogoType") - .HasColumnType("tinyint"); - - b.Property("PartnerId") - .HasColumnType("int"); - - b.Property("TargetUrl") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.HasKey("Id"); - - b.HasIndex("PartnerId"); - - b.ToTable("partner_source_links", "partners"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Partners.StreetcodePartner", b => - { - b.Property("PartnerId") - .HasColumnType("int"); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.HasKey("PartnerId", "StreetcodeId"); - - b.HasIndex("StreetcodeId"); - - b.ToTable("streetcode_partners", "streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Sources.SourceLinkCategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("ImageId") - .HasColumnType("int"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("ImageId"); - - b.ToTable("source_link_categories", "sources"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Sources.StreetcodeCategoryContent", b => - { - b.Property("SourceLinkCategoryId") - .HasColumnType("int"); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.Property("Text") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("nvarchar(max)"); - - b.HasKey("SourceLinkCategoryId", "StreetcodeId"); - - b.HasIndex("StreetcodeId"); - - b.ToTable("streetcode_source_link_categories", "sources"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.RelatedFigure", b => - { - b.Property("ObserverId") - .HasColumnType("int"); - - b.Property("TargetId") - .HasColumnType("int"); - - b.HasKey("ObserverId", "TargetId"); - - b.HasIndex("TargetId"); - - b.ToTable("related_figures", "streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.StreetcodeArt", b => - { - b.Property("ArtId") - .HasColumnType("int"); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.Property("Index") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); - - b.HasKey("ArtId", "StreetcodeId"); - - b.HasIndex("StreetcodeId"); - - b.HasIndex("ArtId", "StreetcodeId"); - - b.ToTable("streetcode_art", "streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Alias") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("AudioId") - .HasColumnType("int"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("datetime2") - .HasDefaultValueSql("GETDATE()"); - - b.Property("DateString") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("EventEndOrPersonDeathDate") - .HasColumnType("datetime2"); - - b.Property("EventStartOrPersonBirthDate") - .HasColumnType("datetime2"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("StreetcodeType") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Teaser") - .HasMaxLength(650) - .HasColumnType("nvarchar(650)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("TransliterationUrl") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("UpdatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("datetime2") - .HasDefaultValueSql("GETDATE()"); - - b.Property("ViewCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.HasKey("Id"); - - b.HasIndex("AudioId") - .IsUnique() - .HasFilter("[AudioId] IS NOT NULL"); - - b.HasIndex("Index") - .IsUnique(); - - b.HasIndex("TransliterationUrl") - .IsUnique(); - - b.ToTable("streetcodes", "streetcode"); - - b.HasDiscriminator("StreetcodeType").HasValue("streetcode-base"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.TextContent.Fact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("FactContent") - .IsRequired() - .HasMaxLength(600) - .HasColumnType("nvarchar(600)"); - - b.Property("ImageId") - .HasColumnType("int"); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("ImageId"); - - b.HasIndex("StreetcodeId"); - - b.ToTable("facts", "streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.TextContent.RelatedTerm", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("TermId") - .HasColumnType("int"); - - b.Property("Word") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("TermId"); - - b.ToTable("related_terms", "streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.TextContent.Term", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.ToTable("terms", "streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.TextContent.Text", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("AdditionalText") - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.Property("TextContent") - .IsRequired() - .HasMaxLength(15000) - .HasColumnType("nvarchar(max)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("nvarchar(300)"); - - b.HasKey("Id"); - - b.HasIndex("StreetcodeId") - .IsUnique(); - - b.ToTable("texts", "streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Team.Positions", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Position") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.ToTable("positions", "team"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Team.TeamMember", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Description") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("ImageId") - .HasColumnType("int"); - - b.Property("IsMain") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ImageId") - .IsUnique(); - - b.ToTable("team_members", "team"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Team.TeamMemberLink", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("LogoType") - .HasColumnType("tinyint"); - - b.Property("TargetUrl") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.Property("TeamMemberId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TeamMemberId"); - - b.ToTable("team_member_links", "team"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Team.TeamMemberPositions", b => - { - b.Property("TeamMemberId") - .HasColumnType("int"); - - b.Property("PositionsId") - .HasColumnType("int"); - - b.HasKey("TeamMemberId", "PositionsId"); - - b.HasIndex("PositionsId"); - - b.ToTable("team_member_positions", "team"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Timeline.HistoricalContext", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Title") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.ToTable("historical_contexts", "timeline"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Timeline.HistoricalContextTimeline", b => - { - b.Property("TimelineId") - .HasColumnType("int"); - - b.Property("HistoricalContextId") - .HasColumnType("int"); - - b.HasKey("TimelineId", "HistoricalContextId"); - - b.HasIndex("HistoricalContextId"); - - b.ToTable("HistoricalContextsTimelines"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Timeline.TimelineItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Date") - .HasColumnType("datetime2"); - - b.Property("DateViewPattern") - .HasColumnType("int"); - - b.Property("Description") - .HasMaxLength(600) - .HasColumnType("nvarchar(600)"); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("StreetcodeId"); - - b.ToTable("timeline_items", "timeline"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Toponyms.StreetcodeToponym", b => - { - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.Property("ToponymId") - .HasColumnType("int"); - - b.HasKey("StreetcodeId", "ToponymId"); - - b.HasIndex("ToponymId"); - - b.ToTable("streetcode_toponym", "streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Toponyms.Toponym", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("AdminRegionNew") - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("AdminRegionOld") - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("Community") - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("Gromada") - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("Oblast") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("StreetName") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("StreetType") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.ToTable("toponyms", "toponyms"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Transactions.TransactionLink", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.Property("Url") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.Property("UrlTitle") - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.HasKey("Id"); - - b.HasIndex("StreetcodeId") - .IsUnique(); - - b.ToTable("transaction_links", "transactions"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Users.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); - - b.Property("Email") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Login") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("Password") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); - - b.Property("Role") - .HasColumnType("int"); - - b.Property("Surname") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.ToTable("Users", "Users"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.Coordinates.Types.StreetcodeCoordinate", b => - { - b.HasBaseType("Streetcode.DAL.Entities.AdditionalContent.Coordinates.Coordinate"); - - b.Property("StreetcodeId") - .HasColumnType("int"); - - b.HasIndex("StreetcodeId"); - - b.ToTable("coordinates", "add_content"); - - b.HasDiscriminator().HasValue("coordinate_streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.Coordinates.Types.ToponymCoordinate", b => - { - b.HasBaseType("Streetcode.DAL.Entities.AdditionalContent.Coordinates.Coordinate"); - - b.Property("ToponymId") - .HasColumnType("int"); - - b.HasIndex("ToponymId") - .IsUnique() - .HasFilter("[ToponymId] IS NOT NULL"); - - b.ToTable("coordinates", "add_content"); - - b.HasDiscriminator().HasValue("coordinate_toponym"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.Types.EventStreetcode", b => - { - b.HasBaseType("Streetcode.DAL.Entities.Streetcode.StreetcodeContent"); - - b.ToTable("streetcodes", "streetcode"); - - b.HasDiscriminator().HasValue("streetcode-event"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.Types.PersonStreetcode", b => - { - b.HasBaseType("Streetcode.DAL.Entities.Streetcode.StreetcodeContent"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("Rank") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.ToTable("streetcodes", "streetcode"); - - b.HasDiscriminator().HasValue("streetcode-person"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.StreetcodeTagIndex", b => - { - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany("StreetcodeTagIndices") - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Streetcode.DAL.Entities.AdditionalContent.Tag", "Tag") - .WithMany("StreetcodeTagIndices") - .HasForeignKey("TagId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Streetcode"); - - b.Navigation("Tag"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.Subtitle", b => - { - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany("Subtitles") - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Analytics.StatisticRecord", b => - { - b.HasOne("Streetcode.DAL.Entities.AdditionalContent.Coordinates.Types.StreetcodeCoordinate", "StreetcodeCoordinate") - .WithOne("StatisticRecord") - .HasForeignKey("Streetcode.DAL.Entities.Analytics.StatisticRecord", "StreetcodeCoordinateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany("StatisticRecords") - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - - b.Navigation("Streetcode"); - - b.Navigation("StreetcodeCoordinate"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Images.Art", b => - { - b.HasOne("Streetcode.DAL.Entities.Media.Images.Image", "Image") - .WithOne("Art") - .HasForeignKey("Streetcode.DAL.Entities.Media.Images.Art", "ImageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Image"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Images.ImageDetails", b => - { - b.HasOne("Streetcode.DAL.Entities.Media.Images.Image", "Image") - .WithOne("ImageDetails") - .HasForeignKey("Streetcode.DAL.Entities.Media.Images.ImageDetails", "ImageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Image"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Images.StreetcodeImage", b => - { - b.HasOne("Streetcode.DAL.Entities.Media.Images.Image", "Image") - .WithMany() - .HasForeignKey("ImageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany() - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Image"); - - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Video", b => - { - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany("Videos") - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.News.News", b => - { - b.HasOne("Streetcode.DAL.Entities.Media.Images.Image", "Image") - .WithOne("News") - .HasForeignKey("Streetcode.DAL.Entities.News.News", "ImageId"); - - b.Navigation("Image"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Partners.Partner", b => - { - b.HasOne("Streetcode.DAL.Entities.Media.Images.Image", "Logo") - .WithOne("Partner") - .HasForeignKey("Streetcode.DAL.Entities.Partners.Partner", "LogoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Logo"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Partners.PartnerSourceLink", b => - { - b.HasOne("Streetcode.DAL.Entities.Partners.Partner", "Partner") - .WithMany("PartnerSourceLinks") - .HasForeignKey("PartnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Partner"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Partners.StreetcodePartner", b => - { - b.HasOne("Streetcode.DAL.Entities.Partners.Partner", "Partner") - .WithMany() - .HasForeignKey("PartnerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany() - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Partner"); - - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Sources.SourceLinkCategory", b => - { - b.HasOne("Streetcode.DAL.Entities.Media.Images.Image", "Image") - .WithMany("SourceLinkCategories") - .HasForeignKey("ImageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Image"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Sources.StreetcodeCategoryContent", b => - { - b.HasOne("Streetcode.DAL.Entities.Sources.SourceLinkCategory", "SourceLinkCategory") - .WithMany("StreetcodeCategoryContents") - .HasForeignKey("SourceLinkCategoryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany("StreetcodeCategoryContents") - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("SourceLinkCategory"); - - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.RelatedFigure", b => - { - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Observer") - .WithMany("Observers") - .HasForeignKey("ObserverId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Target") - .WithMany("Targets") - .HasForeignKey("TargetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Observer"); - - b.Navigation("Target"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.StreetcodeArt", b => - { - b.HasOne("Streetcode.DAL.Entities.Media.Images.Art", "Art") - .WithMany("StreetcodeArts") - .HasForeignKey("ArtId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany("StreetcodeArts") - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Art"); - - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", b => - { - b.HasOne("Streetcode.DAL.Entities.Media.Audio", "Audio") - .WithOne("Streetcode") - .HasForeignKey("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "AudioId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("Audio"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.TextContent.Fact", b => - { - b.HasOne("Streetcode.DAL.Entities.Media.Images.Image", "Image") - .WithMany("Facts") - .HasForeignKey("ImageId") - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany("Facts") - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Image"); - - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.TextContent.RelatedTerm", b => - { - b.HasOne("Streetcode.DAL.Entities.Streetcode.TextContent.Term", "Term") - .WithMany("RelatedTerms") - .HasForeignKey("TermId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Term"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.TextContent.Text", b => - { - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithOne("Text") - .HasForeignKey("Streetcode.DAL.Entities.Streetcode.TextContent.Text", "StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Team.TeamMember", b => - { - b.HasOne("Streetcode.DAL.Entities.Media.Images.Image", "Image") - .WithOne("TeamMember") - .HasForeignKey("Streetcode.DAL.Entities.Team.TeamMember", "ImageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Image"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Team.TeamMemberLink", b => - { - b.HasOne("Streetcode.DAL.Entities.Team.TeamMember", "TeamMember") - .WithMany("TeamMemberLinks") - .HasForeignKey("TeamMemberId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TeamMember"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Team.TeamMemberPositions", b => - { - b.HasOne("Streetcode.DAL.Entities.Team.Positions", "Positions") - .WithMany() - .HasForeignKey("PositionsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Streetcode.DAL.Entities.Team.TeamMember", "TeamMember") - .WithMany() - .HasForeignKey("TeamMemberId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Positions"); - - b.Navigation("TeamMember"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Timeline.HistoricalContextTimeline", b => - { - b.HasOne("Streetcode.DAL.Entities.Timeline.HistoricalContext", "HistoricalContext") - .WithMany("HistoricalContextTimelines") - .HasForeignKey("HistoricalContextId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Streetcode.DAL.Entities.Timeline.TimelineItem", "Timeline") - .WithMany("HistoricalContextTimelines") - .HasForeignKey("TimelineId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("HistoricalContext"); - - b.Navigation("Timeline"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Timeline.TimelineItem", b => - { - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany("TimelineItems") - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Toponyms.StreetcodeToponym", b => - { - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany() - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Streetcode.DAL.Entities.Toponyms.Toponym", "Toponym") - .WithMany() - .HasForeignKey("ToponymId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Streetcode"); - - b.Navigation("Toponym"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Transactions.TransactionLink", b => - { - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithOne("TransactionLink") - .HasForeignKey("Streetcode.DAL.Entities.Transactions.TransactionLink", "StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.Coordinates.Types.StreetcodeCoordinate", b => - { - b.HasOne("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", "Streetcode") - .WithMany("Coordinates") - .HasForeignKey("StreetcodeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.Coordinates.Types.ToponymCoordinate", b => - { - b.HasOne("Streetcode.DAL.Entities.Toponyms.Toponym", "Toponym") - .WithOne("Coordinate") - .HasForeignKey("Streetcode.DAL.Entities.AdditionalContent.Coordinates.Types.ToponymCoordinate", "ToponymId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Toponym"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.Tag", b => - { - b.Navigation("StreetcodeTagIndices"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Audio", b => - { - b.Navigation("Streetcode"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Images.Art", b => - { - b.Navigation("StreetcodeArts"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Media.Images.Image", b => - { - b.Navigation("Art"); - - b.Navigation("Facts"); - - b.Navigation("ImageDetails"); - - b.Navigation("News"); - - b.Navigation("Partner"); - - b.Navigation("SourceLinkCategories"); - - b.Navigation("TeamMember"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Partners.Partner", b => - { - b.Navigation("PartnerSourceLinks"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Sources.SourceLinkCategory", b => - { - b.Navigation("StreetcodeCategoryContents"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.StreetcodeContent", b => - { - b.Navigation("Coordinates"); - - b.Navigation("Facts"); - - b.Navigation("Observers"); - - b.Navigation("StatisticRecords"); - - b.Navigation("StreetcodeArts"); - - b.Navigation("StreetcodeCategoryContents"); - - b.Navigation("StreetcodeTagIndices"); - - b.Navigation("Subtitles"); - - b.Navigation("Targets"); - - b.Navigation("Text"); - - b.Navigation("TimelineItems"); - - b.Navigation("TransactionLink"); - - b.Navigation("Videos"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Streetcode.TextContent.Term", b => - { - b.Navigation("RelatedTerms"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Team.TeamMember", b => - { - b.Navigation("TeamMemberLinks"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Timeline.HistoricalContext", b => - { - b.Navigation("HistoricalContextTimelines"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Timeline.TimelineItem", b => - { - b.Navigation("HistoricalContextTimelines"); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.Toponyms.Toponym", b => - { - b.Navigation("Coordinate") - .IsRequired(); - }); - - modelBuilder.Entity("Streetcode.DAL.Entities.AdditionalContent.Coordinates.Types.StreetcodeCoordinate", b => - { - b.Navigation("StatisticRecord") - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Streetcode/Streetcode.DAL/Persistence/Migrations/20231130202258_DatestringLength.cs b/Streetcode/Streetcode.DAL/Persistence/Migrations/20231130202258_DatestringLength.cs deleted file mode 100644 index 707b37cba..000000000 --- a/Streetcode/Streetcode.DAL/Persistence/Migrations/20231130202258_DatestringLength.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Streetcode.DAL.Persistence.Migrations -{ - public partial class DatestringLength : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "DateString", - schema: "streetcode", - table: "streetcodes", - type: "nvarchar(100)", - maxLength: 100, - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(50)", - oldMaxLength: 50); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "DateString", - schema: "streetcode", - table: "streetcodes", - type: "nvarchar(50)", - maxLength: 50, - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(100)", - oldMaxLength: 100); - } - } -} diff --git a/Streetcode/Streetcode.DAL/Persistence/Migrations/StreetcodeDbContextModelSnapshot.cs b/Streetcode/Streetcode.DAL/Persistence/Migrations/StreetcodeDbContextModelSnapshot.cs index ffda3f915..d8703c870 100644 --- a/Streetcode/Streetcode.DAL/Persistence/Migrations/StreetcodeDbContextModelSnapshot.cs +++ b/Streetcode/Streetcode.DAL/Persistence/Migrations/StreetcodeDbContextModelSnapshot.cs @@ -576,8 +576,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("DateString") .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("EventEndOrPersonDeathDate") .HasColumnType("datetime2"); diff --git a/Streetcode/Streetcode.WebApi/Controllers/Streetcode/StreetcodeController.cs b/Streetcode/Streetcode.WebApi/Controllers/Streetcode/StreetcodeController.cs index 6cf02d06a..6205d3d7a 100644 --- a/Streetcode/Streetcode.WebApi/Controllers/Streetcode/StreetcodeController.cs +++ b/Streetcode/Streetcode.WebApi/Controllers/Streetcode/StreetcodeController.cs @@ -90,9 +90,9 @@ public async Task GetAllCatalog([FromQuery] int page, [FromQuery] } [HttpGet] - public async Task GetCount([FromQuery] bool? onlyPublished) + public async Task GetCount() { - return HandleResult(await Mediator.Send(new GetStreetcodesCountQuery(onlyPublished ?? false))); + return HandleResult(await Mediator.Send(new GetStreetcodesCountQuery())); } [HttpGet("{url}")] diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/AdditionalContent/CoordinateControllerTests.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/AdditionalContent/CoordinateControllerTests.cs index 5986c9ae5..5f74ab6c9 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/AdditionalContent/CoordinateControllerTests.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/AdditionalContent/CoordinateControllerTests.cs @@ -1,10 +1,10 @@ -using Streetcode.BLL.DTO.AdditionalContent.Coordinates.Types; -using Streetcode.XIntegrationTest.ControllerTests.Utils; -using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode; -using Xunit; - -namespace Streetcode.XIntegrationTest.ControllerTests.AdditionalContent +namespace Streetcode.XIntegrationTest.ControllerTests.AdditionalContent { + using Streetcode.BLL.DTO.AdditionalContent.Coordinates.Types; + using Streetcode.XIntegrationTest.ControllerTests.Utils; + using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode; + using Xunit; + public class CoordinateControllerTests : BaseControllerTests, IClassFixture> { public CoordinateControllerTests(CustomWebApplicationFactory factory) diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/AdditionalContent/TagControllerTests.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/AdditionalContent/TagControllerTests.cs index ef20a8664..e28dfa36b 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/AdditionalContent/TagControllerTests.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/AdditionalContent/TagControllerTests.cs @@ -1,13 +1,14 @@ -using global::Streetcode.XIntegrationTest.ControllerTests.Utils; -using Streetcode.BLL.DTO.AdditionalContent; -using Streetcode.BLL.DTO.AdditionalContent.Tag; -using Streetcode.DAL.Entities.AdditionalContent; -using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.AdditionalContent.Tag; -using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode; -using Xunit; - -namespace Streetcode.XIntegrationTest.ControllerTests.AdditionalContent +namespace Streetcode.XIntegrationTest.ControllerTests.AdditionalContent { + using Streetcode.BLL.DTO.AdditionalContent; + using Streetcode.BLL.DTO.AdditionalContent.Tag; + using Streetcode.DAL.Entities.AdditionalContent; + using Streetcode.DAL.Entities.Streetcode.TextContent; + using Streetcode.XIntegrationTest.ControllerTests.Utils; + using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.AdditionalContent.Tag; + using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode; + using Xunit; + public class TagControllerTests : BaseControllerTests, IClassFixture> { public TagControllerTests(CustomWebApplicationFactory factory) diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/BaseControllerTests.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/BaseControllerTests.cs index 7767b53ee..b645ddd5a 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/BaseControllerTests.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/BaseControllerTests.cs @@ -1,11 +1,10 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Streetcode.DAL.Persistence; -using Streetcode.XIntegrationTest.ControllerTests.Utils; -using Xunit; - -namespace Streetcode.XIntegrationTest.ControllerTests +namespace Streetcode.XIntegrationTest.ControllerTests { + using Microsoft.EntityFrameworkCore; + using Microsoft.Extensions.Configuration; + using Streetcode.DAL.Persistence; + using Streetcode.XIntegrationTest.ControllerTests.Utils; + using Xunit; public class BaseControllerTests : IntegrationTestBase, IClassFixture> { diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/AudioControllerTests.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/AudioControllerTests.cs index f19749633..5fc97daec 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/AudioControllerTests.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/AudioControllerTests.cs @@ -2,6 +2,7 @@ using Streetcode.DAL.Entities.Media; using Streetcode.XIntegrationTest.ControllerTests.Utils; using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Media.Audio; +using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode; using Xunit; namespace Streetcode.XIntegrationTest.ControllerTests.Media diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/Images/StreetcodeArtControllerTests.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/Images/StreetcodeArtControllerTests.cs index 62a906f18..64a0cf559 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/Images/StreetcodeArtControllerTests.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/Images/StreetcodeArtControllerTests.cs @@ -1,9 +1,9 @@ -using Streetcode.BLL.DTO.Media.Art; -using Streetcode.XIntegrationTest.ControllerTests.Utils; -using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode; -using Xunit; -namespace Streetcode.XIntegrationTest.ControllerTests.Media.Images +namespace Streetcode.XIntegrationTest.ControllerTests.Media.Images { + using Streetcode.BLL.DTO.Media.Art; + using Streetcode.XIntegrationTest.ControllerTests.Utils; + using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode; + using Xunit; public class StreetcodeArtControllerTests : BaseControllerTests, IClassFixture> { diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/VideoControllerTests.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/VideoControllerTests.cs index 6825ea683..a59cd3865 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/VideoControllerTests.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/VideoControllerTests.cs @@ -1,8 +1,9 @@ -using Streetcode.BLL.DTO.Media; -using Streetcode.XIntegrationTest.ControllerTests.Utils; -using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Media.Video; -namespace Streetcode.XIntegrationTest.ControllerTests.Media +namespace Streetcode.XIntegrationTest.ControllerTests.Media { + using Streetcode.BLL.DTO.Media; + using Streetcode.BLL.DTO.Media.Audio; + using Streetcode.XIntegrationTest.ControllerTests.Utils; + using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Media.Video; using Xunit; public class VideoControllerTests : BaseControllerTests, IClassFixture> diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Coordinate/ExtractTestStreetcodeCoordinate.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Coordinate/ExtractTestStreetcodeCoordinate.cs index c8aa5b104..cb0bc5c9d 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Coordinate/ExtractTestStreetcodeCoordinate.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Coordinate/ExtractTestStreetcodeCoordinate.cs @@ -19,14 +19,14 @@ public override void Before(MethodInfo methodUnderTest) { StreetcodeContent first = sqlDbHelper.GetExistItem(); first ??= sqlDbHelper.AddNewItem(new StreetcodeContent() - { - Index = 10, - UpdatedAt = DateTime.Now, - CreatedAt = DateTime.Now, - EventStartOrPersonBirthDate = DateTime.Now, - EventEndOrPersonDeathDate = DateTime.Now, - ViewCount = 1, - }); + { + Index = 10, + UpdatedAt = DateTime.Now, + CreatedAt = DateTime.Now, + EventStartOrPersonBirthDate = DateTime.Now, + EventEndOrPersonDeathDate = DateTime.Now, + ViewCount = 1, + }); CoordinateForTest = sqlDbHelper.AddNewItem( new StreetcodeCoordinate() diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Coordinate/ExtractTestToponymCoordinate.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Coordinate/ExtractTestToponymCoordinate.cs index 9884bc733..eb8a45891 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Coordinate/ExtractTestToponymCoordinate.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Coordinate/ExtractTestToponymCoordinate.cs @@ -1,12 +1,17 @@ using Streetcode.DAL.Entities.AdditionalContent.Coordinates.Types; using Streetcode.DAL.Entities.Toponyms; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; +using System.Text; +using System.Threading.Tasks; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.AdditionalContent.Coordinate { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExtractTestToponymCoordinate : BeforeAfterTestAttribute + internal class ExtractTestToponymCoordinate:BeforeAfterTestAttribute { public static ToponymCoordinate ToponymCoordinateForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Subtitle/ExtractTestSubtitle.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Subtitle/ExtractTestSubtitle.cs index 6758057bc..7c577860c 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Subtitle/ExtractTestSubtitle.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Subtitle/ExtractTestSubtitle.cs @@ -1,6 +1,15 @@ -using Streetcode.DAL.Entities.Streetcode; -using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Streetcode.DAL.Entities; +using Streetcode.DAL.Entities.Streetcode; +using Streetcode.DAL.Persistence; +using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.AdditionalContent.Subtitle diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Tag/ExtractTestTag.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Tag/ExtractTestTag.cs index 25bd4db21..33d3b63b2 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Tag/ExtractTestTag.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Tag/ExtractTestTag.cs @@ -1,10 +1,11 @@ -using System.Reflection; +using Streetcode.DAL.Entities.AdditionalContent; +using System.Reflection; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.AdditionalContent.Tag { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - public class ExtractTestTag : BeforeAfterTestAttribute + public class ExtractTestTag: BeforeAfterTestAttribute { public static DAL.Entities.AdditionalContent.Tag TagForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Tag/StreetcodeTagIndexSetup.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Tag/StreetcodeTagIndexSetup.cs index 2dbc8ef87..41f223b91 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Tag/StreetcodeTagIndexSetup.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/AdditionalContent/Tag/StreetcodeTagIndexSetup.cs @@ -1,5 +1,10 @@ using Streetcode.DAL.Entities.AdditionalContent; using Streetcode.DAL.Entities.Streetcode; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.AdditionalContent.Tag { diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/Art/ExtractTestArt.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/Art/ExtractTestArt.cs index 10e339d5f..56f738846 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/Art/ExtractTestArt.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/Art/ExtractTestArt.cs @@ -6,7 +6,7 @@ namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Media.Images.Art { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExtractTestArt : BeforeAfterTestAttribute + internal class ExtractTestArt: BeforeAfterTestAttribute { public static DAL.Entities.Media.Images.Art ArtForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/Image/ExtractTestImage.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/Image/ExtractTestImage.cs index adbe0c84e..0b595a58c 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/Image/ExtractTestImage.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/Image/ExtractTestImage.cs @@ -7,7 +7,7 @@ namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Media.Images.Image { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - public class ExtractTestImage : BeforeAfterTestAttribute + public class ExtractTestImage: BeforeAfterTestAttribute { public static DAL.Entities.Media.Images.Image ImageForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/StreetcodeArt/ExtractTestStreetcodeArt.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/StreetcodeArt/ExtractTestStreetcodeArt.cs index 0486e2f8f..06cb3fd95 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/StreetcodeArt/ExtractTestStreetcodeArt.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Images/StreetcodeArt/ExtractTestStreetcodeArt.cs @@ -6,7 +6,7 @@ namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Media.Images.StreetcodeArt { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExtractTestStreetcodeArt : BeforeAfterTestAttribute + internal class ExtractTestStreetcodeArt:BeforeAfterTestAttribute { public static DAL.Entities.Streetcode.StreetcodeArt StreetcodeArtForTest; @@ -14,7 +14,7 @@ public override void Before(MethodInfo methodUnderTest) { var sqlDbHelper = BaseControllerTests.GetSqlDbHelper(); StreetcodeArtForTest = sqlDbHelper.GetExistItem(); - if (StreetcodeArtForTest == null) + if(StreetcodeArtForTest == null) { if (ExtractTestStreetcode.StreetcodeForTest == null) { diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Video/ExtractTestVideo.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Video/ExtractTestVideo.cs index 0cbbb38f8..002b457e3 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Video/ExtractTestVideo.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Media/Video/ExtractTestVideo.cs @@ -6,7 +6,7 @@ namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Media.Video { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExtractTestVideo : BeforeAfterTestAttribute + internal class ExtractTestVideo: BeforeAfterTestAttribute { public static DAL.Entities.Media.Video VideoForTest; public static StreetcodeContent StreetcodeWithVideo; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Partners/ExtractTestPartners.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Partners/ExtractTestPartners.cs index ed7ccf3c3..dd9db72e2 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Partners/ExtractTestPartners.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Partners/ExtractTestPartners.cs @@ -1,12 +1,17 @@ using Streetcode.DAL.Entities.Partners; using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Media.Images.Image; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; +using System.Text; +using System.Threading.Tasks; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Partners { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExtractTestPartners : BeforeAfterTestAttribute + internal class ExtractTestPartners: BeforeAfterTestAttribute { public static Partner PartnerForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Source/SourceLinkCategories/ExtractTestSourceLinkCategory.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Source/SourceLinkCategories/ExtractTestSourceLinkCategory.cs index 380f3ce65..c96d6330c 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Source/SourceLinkCategories/ExtractTestSourceLinkCategory.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Source/SourceLinkCategories/ExtractTestSourceLinkCategory.cs @@ -1,12 +1,18 @@ -using Streetcode.DAL.Entities.Sources; +using Streetcode.DAL.Entities.Partners; +using Streetcode.DAL.Entities.Sources; using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Media.Images.Image; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; +using System.Text; +using System.Threading.Tasks; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Source.SourceLinkCategories { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExtractTestSourceLinkCategory : BeforeAfterTestAttribute + internal class ExtractTestSourceLinkCategory:BeforeAfterTestAttribute { public static SourceLinkCategory SourceLinkCategoryForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/ExtractTestStreetcode.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/ExtractTestStreetcode.cs index c4f325642..4d7546b39 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/ExtractTestStreetcode.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/ExtractTestStreetcode.cs @@ -1,4 +1,5 @@ -using Streetcode.DAL.Entities.Streetcode; +using Streetcode.DAL.Entities.AdditionalContent; +using Streetcode.DAL.Entities.Streetcode; using System.Reflection; using Xunit.Sdk; @@ -27,30 +28,9 @@ public override void Before(MethodInfo methodUnderTest) Alias = "dsf", Title = "Title", TransliterationUrl = Guid.NewGuid().ToString(), - Teaser = "Test Teaser", }); sqlDbHelper.SaveChanges(); } } - - public override void After(MethodInfo methodUnderTest) - { - var sqlDbHelper = BaseControllerTests.GetSqlDbHelper(); - var streetcodeContent = sqlDbHelper.GetExistItem(); - if (streetcodeContent != null) - { - // Restore the original StreetcodeContent - streetcodeContent.EventStartOrPersonBirthDate = StreetcodeForTest.EventStartOrPersonBirthDate; - streetcodeContent.EventEndOrPersonDeathDate = StreetcodeForTest.EventEndOrPersonDeathDate; - streetcodeContent.ViewCount = StreetcodeForTest.ViewCount; - streetcodeContent.DateString = StreetcodeForTest.DateString; - streetcodeContent.Alias = StreetcodeForTest.Alias; - streetcodeContent.Title = StreetcodeForTest.Title; - streetcodeContent.TransliterationUrl = StreetcodeForTest.TransliterationUrl; - streetcodeContent.Teaser = StreetcodeForTest.Teaser; - - sqlDbHelper.SaveChanges(); - } - } } } diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/RelatedFigure/ExtractTestRelatedFigure.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/RelatedFigure/ExtractTestRelatedFigure.cs index ea31620d7..84d896e4d 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/RelatedFigure/ExtractTestRelatedFigure.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/RelatedFigure/ExtractTestRelatedFigure.cs @@ -1,11 +1,16 @@ using Streetcode.DAL.Entities.Streetcode; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; +using System.Text; +using System.Threading.Tasks; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode.RelatedFigure { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExtractTestRelatedFigure : BeforeAfterTestAttribute + internal class ExtractTestRelatedFigure: BeforeAfterTestAttribute { public static DAL.Entities.Streetcode.RelatedFigure RelatedFigureForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Facts/ExtractTestFact.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Facts/ExtractTestFact.cs index aa52d8f21..b0ef66ce9 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Facts/ExtractTestFact.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Facts/ExtractTestFact.cs @@ -1,11 +1,16 @@ using Streetcode.DAL.Entities.Streetcode.TextContent; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; +using System.Text; +using System.Threading.Tasks; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode.TextContent.Facts { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - public class ExtractTestFact : BeforeAfterTestAttribute + public class ExtractTestFact: BeforeAfterTestAttribute { public static Fact FactForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Terms/ExstractTestTerm.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Terms/ExstractTestTerm.cs index bd28a9c2d..cc745822f 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Terms/ExstractTestTerm.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Terms/ExstractTestTerm.cs @@ -1,11 +1,17 @@ using Streetcode.DAL.Entities.Streetcode.TextContent; +using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode.TextContent.Facts; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; +using System.Text; +using System.Threading.Tasks; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode.TextContent.Terms { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExstractTestTerm : BeforeAfterTestAttribute + internal class ExstractTestTerm: BeforeAfterTestAttribute { public static Term TermForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Texts/ExstractTestText.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Texts/ExstractTestText.cs index 42e2bb4e0..36135d839 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Texts/ExstractTestText.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Streetcode/TextContent/Texts/ExstractTestText.cs @@ -1,11 +1,16 @@ using Streetcode.DAL.Entities.Streetcode.TextContent; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; +using System.Text; +using System.Threading.Tasks; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode.TextContent.Texts { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExstractTestText : BeforeAfterTestAttribute + internal class ExstractTestText :BeforeAfterTestAttribute { public static Text TextForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Timelines/ExtractTestTimelineItem.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Timelines/ExtractTestTimelineItem.cs index bed77d9a8..4ecaef22b 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Timelines/ExtractTestTimelineItem.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Timelines/ExtractTestTimelineItem.cs @@ -1,11 +1,16 @@ using Streetcode.DAL.Entities.Timeline; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; +using System.Text; +using System.Threading.Tasks; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Timelines { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExtractTestTimelineItem : BeforeAfterTestAttribute + internal class ExtractTestTimelineItem: BeforeAfterTestAttribute { public static TimelineItem TimelineItemForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Toponyms/ExtractTestToponym.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Toponyms/ExtractTestToponym.cs index 24d6628fe..97c55ff66 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Toponyms/ExtractTestToponym.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Toponyms/ExtractTestToponym.cs @@ -1,12 +1,15 @@ using Streetcode.DAL.Entities.Toponyms; using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.AdditionalContent.Coordinate; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Toponyms { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - internal class ExtractTestToponym : BeforeAfterTestAttribute + internal class ExtractTestToponym:BeforeAfterTestAttribute { public static Toponym ToponymForTest; diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Transactions/ExtractTestTransactionLink.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Transactions/ExtractTestTransactionLink.cs index 6d509064c..3561a7ddd 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Transactions/ExtractTestTransactionLink.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/BeforeAndAfterTestAtribute/Transactions/ExtractTestTransactionLink.cs @@ -1,6 +1,13 @@ -using Streetcode.DAL.Entities.Transactions; +using Streetcode.DAL.Entities.AdditionalContent.Coordinates.Types; +using Streetcode.DAL.Entities.Transactions; using Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Streetcode; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Transactions; using Xunit.Sdk; namespace Streetcode.XIntegrationTest.ControllerTests.Utils.BeforeAndAfterTestAtribute.Transactions diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/CustomWebApplicationFactory.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/CustomWebApplicationFactory.cs index db47e2e8d..8e27ecf3f 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/CustomWebApplicationFactory.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/CustomWebApplicationFactory.cs @@ -1,8 +1,8 @@ namespace Streetcode.XIntegrationTest.ControllerTests.Utils { + using System; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Testing; - using System; public class CustomWebApplicationFactory : WebApplicationFactory where TProgram : class diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/SqlDbHelper.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/SqlDbHelper.cs index 1aa65daf4..137d0b39e 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/SqlDbHelper.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/SqlDbHelper.cs @@ -83,12 +83,6 @@ public T DeleteItem(T item) return this.dbContext.Set().Remove(item).Entity; } - public void RemoveRange() - where T : class, new() - { - this.dbContext.Set().RemoveRange(this.dbContext.Set()); - this.dbContext.SaveChanges(); - } public void SaveChanges() => this.dbContext.SaveChanges(); } } diff --git a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/StreetcodeClient.cs b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/StreetcodeClient.cs index 1be932316..97e3eee4c 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/StreetcodeClient.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ControllerTests/Utils/StreetcodeClient.cs @@ -1,18 +1,18 @@ -using RestSharp; -using RestSharp.Serializers; -using Streetcode.BLL.DTO.Streetcode.Update; - -namespace Streetcode.XIntegrationTest.ControllerTests.Utils +namespace Streetcode.XIntegrationTest.ControllerTests.Utils { + using RestSharp; + using RestSharp.Serializers; + using System.Threading.Tasks; + public class StreetcodeClient { protected RestClient Client; public string SecondPartUrl { get; } - public StreetcodeClient(HttpClient client, string secondPartUrl = "") + public StreetcodeClient(HttpClient client, string secondPartUrl = "") { - this.Client = new RestClient(client) { AcceptedContentTypes = ContentType.JsonAccept }; + this.Client = new RestClient(client) { AcceptedContentTypes=ContentType.JsonAccept }; this.SecondPartUrl = secondPartUrl; } @@ -45,14 +45,5 @@ public async Task GetResponse(string requestString) return returns; } - public async Task UpdateAsync(StreetcodeUpdateDTO updateStreetcodeDTO) - { - var request = new RestRequest($"{this.SecondPartUrl}/Update", Method.Put); - request.AddJsonBody(updateStreetcodeDTO); - request.OnBeforeDeserialization = resp => { resp.ContentType = "application/json"; }; - request.AddHeader("content-type", "application/json"); - var response = await this.Client.ExecuteAsync(request); - return response; - } } } diff --git a/Streetcode/Streetcode.XIntegrationTest/ServiceTests/BlobServiceTests/Utils/BlobStorageFixture.cs b/Streetcode/Streetcode.XIntegrationTest/ServiceTests/BlobServiceTests/Utils/BlobStorageFixture.cs index 911681aa8..07eb4bc2c 100644 --- a/Streetcode/Streetcode.XIntegrationTest/ServiceTests/BlobServiceTests/Utils/BlobStorageFixture.cs +++ b/Streetcode/Streetcode.XIntegrationTest/ServiceTests/BlobServiceTests/Utils/BlobStorageFixture.cs @@ -5,6 +5,8 @@ using Streetcode.DAL.Entities.Media; using Streetcode.DAL.Entities.Media.Images; using Streetcode.DAL.Persistence; +using Streetcode.DAL.Repositories.Realizations.Base; +using Streetcode.XIntegrationTest.Base; using System.Text; namespace Streetcode.XIntegrationTest.ServiceTests.BlobServiceTests.Utils @@ -27,8 +29,8 @@ public BlobStorageFixture() blobPath = environmentVariables.Value.BlobStorePath; blobKey = environmentVariables.Value.BlobStoreKey; - // TestDbContext = TestDBFixture.CreateContext(Configuration.GetConnectionString("DefaultConnection")); - // RepositoryWrapper repo = new RepositoryWrapper(TestDbContext); + // TestDbContext = TestDBFixture.CreateContext(Configuration.GetConnectionString("DefaultConnection")); + // RepositoryWrapper repo = new RepositoryWrapper(TestDbContext); blobService = new BlobService(environmentVariables); // add repo Directory.CreateDirectory(blobPath);