Skip to content

Commit

Permalink
rename projects to Store (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
1bberto authored Mar 16, 2022
1 parent a7f8f62 commit 87d11ef
Show file tree
Hide file tree
Showing 75 changed files with 252 additions and 233 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
dotnet-version: 6.0.x

- name: Restore dependencies
run: dotnet restore ./PubDev.UnitTest.sln
run: dotnet restore ./PubDev.Store.sln

- name: Build
run: dotnet build ./PubDev.UnitTest.sln --no-restore
run: dotnet build ./PubDev.Store.sln --no-restore

- name: Test
run: dotnet test ./PubDev.UnitTest.sln /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
run: dotnet test ./PubDev.Store.sln /p:CollectCoverage=true /p:CoverletOutputFormat=opencover

- name: Set up JDK 11
uses: actions/setup-java@v1
Expand Down Expand Up @@ -62,5 +62,5 @@ jobs:
shell: pwsh
run: |
./.sonar/scanner/dotnet-sonarscanner begin /k:"Pub-Dev_Lesson-DotNet-UnitTest" /o:"pub-dev" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet build ./PubDev.UnitTest.sln --no-restore
dotnet build ./PubDev.Store.sln --no-restore
./.sonar/scanner/dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
25 changes: 13 additions & 12 deletions PubDev.UnitTest.sln → PubDev.Store.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,36 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{121BD010
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EA9921F2-52AD-4934-A29A-4C3E160858D8}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build.yml = .github\workflows\build.yml
docker-compose.yml = docker-compose.yml
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PubDev.UnitTests.API", "src\PubDev.UnitTests.API\PubDev.UnitTests.API.csproj", "{F50E1378-5553-4042-BFCF-4DD38AB4B200}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PubDev.Store.API.Tests", "tests\API.Tests\PubDev.Store.API.Tests.csproj", "{912FFF3C-7C09-4361-93C1-00B295035B39}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PubDev.UnitTests.API.Tests", "tests\PubDev.UnitTests.API.Tests\PubDev.UnitTests.API.Tests.csproj", "{88808EA3-F60A-4190-A3DF-0D2BA62DF69A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PubDev.Store.API", "src\API\PubDev.Store.API.csproj", "{031A81AC-5AA3-4AB9-B8B5-159FF59C4706}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F50E1378-5553-4042-BFCF-4DD38AB4B200}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F50E1378-5553-4042-BFCF-4DD38AB4B200}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F50E1378-5553-4042-BFCF-4DD38AB4B200}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F50E1378-5553-4042-BFCF-4DD38AB4B200}.Release|Any CPU.Build.0 = Release|Any CPU
{88808EA3-F60A-4190-A3DF-0D2BA62DF69A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88808EA3-F60A-4190-A3DF-0D2BA62DF69A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88808EA3-F60A-4190-A3DF-0D2BA62DF69A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88808EA3-F60A-4190-A3DF-0D2BA62DF69A}.Release|Any CPU.Build.0 = Release|Any CPU
{912FFF3C-7C09-4361-93C1-00B295035B39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{912FFF3C-7C09-4361-93C1-00B295035B39}.Debug|Any CPU.Build.0 = Debug|Any CPU
{912FFF3C-7C09-4361-93C1-00B295035B39}.Release|Any CPU.ActiveCfg = Release|Any CPU
{912FFF3C-7C09-4361-93C1-00B295035B39}.Release|Any CPU.Build.0 = Release|Any CPU
{031A81AC-5AA3-4AB9-B8B5-159FF59C4706}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{031A81AC-5AA3-4AB9-B8B5-159FF59C4706}.Debug|Any CPU.Build.0 = Debug|Any CPU
{031A81AC-5AA3-4AB9-B8B5-159FF59C4706}.Release|Any CPU.ActiveCfg = Release|Any CPU
{031A81AC-5AA3-4AB9-B8B5-159FF59C4706}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{F50E1378-5553-4042-BFCF-4DD38AB4B200} = {F3D09DE2-DC76-4250-9D3B-E54B591418DD}
{88808EA3-F60A-4190-A3DF-0D2BA62DF69A} = {121BD010-29A8-4E58-B462-EEF6CB0F84F3}
{912FFF3C-7C09-4361-93C1-00B295035B39} = {121BD010-29A8-4E58-B462-EEF6CB0F84F3}
{031A81AC-5AA3-4AB9-B8B5-159FF59C4706} = {F3D09DE2-DC76-4250-9D3B-E54B591418DD}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E80A9564-D0A6-47AE-94E2-09F4BD3DB6F5}
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=Pub-Dev_Lesson-DotNet-UnitTest&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=Pub-Dev_Lesson-DotNet-UnitTest)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=Pub-Dev_Lesson-DotNet-UnitTest&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=Pub-Dev_Lesson-DotNet-UnitTest)

## Pub Dev Unit Tests 📚🕹
## Pub Dev Store 📚🕹

this read-me still under development, We had time to develop the whole solution but not to create a good read-me 😜

Expand Down Expand Up @@ -44,7 +44,6 @@ dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
<!-- ROADMAP -->
## Roadmap

- Create git actions to build and test
- Ran out of Ideas 🤣, feel free to add one

See the [open issues](https://github.com/Pub-Dev/Lesson-DotNet-UnitTest/issues) for a full list of proposed features (and known issues).
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#nullable disable

namespace PubDev.UnitTests.API.Configuration.Migrations
namespace PubDev.Store.API.Configuration.Migrations
{
public partial class Initial : Migration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using PubDev.UnitTests.API.Configuration;
using PubDev.Store.API.Configuration;

#nullable disable

namespace PubDev.UnitTests.API.Configuration.Migrations
namespace PubDev.Store.API.Configuration.Migrations
{
[DbContext(typeof(PubDevDbContext))]
partial class PubDevDbContextModelSnapshot : ModelSnapshot
Expand All @@ -22,7 +22,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)

SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);

modelBuilder.Entity("PubDev.UnitTests.API.Entities.Client", b =>
modelBuilder.Entity("PubDev.Store.API.Entities.Client", b =>
{
b.Property<int>("ClientId")
.ValueGeneratedOnAdd()
Expand All @@ -46,7 +46,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("Client", (string)null);
});

modelBuilder.Entity("PubDev.UnitTests.API.Entities.Order", b =>
modelBuilder.Entity("PubDev.Store.API.Entities.Order", b =>
{
b.Property<int>("OrderId")
.ValueGeneratedOnAdd()
Expand All @@ -70,7 +70,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("Order", (string)null);
});

modelBuilder.Entity("PubDev.UnitTests.API.Entities.OrderProduct", b =>
modelBuilder.Entity("PubDev.Store.API.Entities.OrderProduct", b =>
{
b.Property<int>("OrderProductId")
.ValueGeneratedOnAdd()
Expand Down Expand Up @@ -103,7 +103,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("OrderProduct", (string)null);
});

modelBuilder.Entity("PubDev.UnitTests.API.Entities.Product", b =>
modelBuilder.Entity("PubDev.Store.API.Entities.Product", b =>
{
b.Property<int>("ProductId")
.ValueGeneratedOnAdd()
Expand All @@ -130,9 +130,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("Product", (string)null);
});

modelBuilder.Entity("PubDev.UnitTests.API.Entities.Order", b =>
modelBuilder.Entity("PubDev.Store.API.Entities.Order", b =>
{
b.HasOne("PubDev.UnitTests.API.Entities.Client", "Client")
b.HasOne("PubDev.Store.API.Entities.Client", "Client")
.WithMany("Orders")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
Expand All @@ -142,16 +142,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Navigation("Client");
});

modelBuilder.Entity("PubDev.UnitTests.API.Entities.OrderProduct", b =>
modelBuilder.Entity("PubDev.Store.API.Entities.OrderProduct", b =>
{
b.HasOne("PubDev.UnitTests.API.Entities.Order", "Order")
b.HasOne("PubDev.Store.API.Entities.Order", "Order")
.WithMany("OrderProducts")
.HasForeignKey("OrderId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_OrderProduct_Order_OrderId");

b.HasOne("PubDev.UnitTests.API.Entities.Product", "Product")
b.HasOne("PubDev.Store.API.Entities.Product", "Product")
.WithMany("OrderProducts")
.HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade)
Expand All @@ -163,17 +163,17 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Navigation("Product");
});

modelBuilder.Entity("PubDev.UnitTests.API.Entities.Client", b =>
modelBuilder.Entity("PubDev.Store.API.Entities.Client", b =>
{
b.Navigation("Orders");
});

modelBuilder.Entity("PubDev.UnitTests.API.Entities.Order", b =>
modelBuilder.Entity("PubDev.Store.API.Entities.Order", b =>
{
b.Navigation("OrderProducts");
});

modelBuilder.Entity("PubDev.UnitTests.API.Entities.Product", b =>
modelBuilder.Entity("PubDev.Store.API.Entities.Product", b =>
{
b.Navigation("OrderProducts");
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using System.Diagnostics.CodeAnalysis;

namespace PubDev.UnitTests.API.Configuration;
namespace PubDev.Store.API.Configuration;

[ExcludeFromCodeCoverage]
public class PubDevDbContext : DbContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using PubDev.UnitTests.API.Entities;
using PubDev.Store.API.Entities;

namespace PubDev.UnitTests.API.Configuration.Tables;
namespace PubDev.Store.API.Configuration.Tables;

public class ClientConfiguration : IEntityTypeConfiguration<Client>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using PubDev.UnitTests.API.Entities;
using PubDev.Store.API.Entities;

namespace PubDev.UnitTests.API.Configuration.Tables;
namespace PubDev.Store.API.Configuration.Tables;

public class OrderConfiguration : IEntityTypeConfiguration<Order>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using PubDev.UnitTests.API.Entities;
using PubDev.Store.API.Entities;

namespace PubDev.UnitTests.API.Configuration.Tables;
namespace PubDev.Store.API.Configuration.Tables;

public class OrderProductConfiguration : IEntityTypeConfiguration<OrderProduct>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using PubDev.UnitTests.API.Entities;
using PubDev.Store.API.Entities;

namespace PubDev.UnitTests.API.Configuration.Tables;
namespace PubDev.Store.API.Configuration.Tables;

public class ProductConfiguration : IEntityTypeConfiguration<Product>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using PubDev.UnitTests.API.Entities;
using PubDev.UnitTests.API.Interfaces.Presenters;
using PubDev.UnitTests.API.Interfaces.Services;
using PubDev.UnitTests.API.Requests;
using PubDev.UnitTests.API.Responses;
using PubDev.Store.API.Entities;
using PubDev.Store.API.Interfaces.Presenters;
using PubDev.Store.API.Interfaces.Services;
using PubDev.Store.API.Requests;
using PubDev.Store.API.Responses;
using System.Net;

namespace PubDev.UnitTests.API.Controllers;
namespace PubDev.Store.API.Controllers;

[ApiController]
[Route("clients")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using PubDev.UnitTests.API.Entities;
using PubDev.UnitTests.API.Interfaces.Presenters;
using PubDev.UnitTests.API.Interfaces.Services;
using PubDev.UnitTests.API.Requests;
using PubDev.UnitTests.API.Responses;
using PubDev.Store.API.Entities;
using PubDev.Store.API.Interfaces.Presenters;
using PubDev.Store.API.Interfaces.Services;
using PubDev.Store.API.Requests;
using PubDev.Store.API.Responses;
using System.Net;

namespace PubDev.UnitTests.API.Controllers;
namespace PubDev.Store.API.Controllers;

[ApiController]
[Route("orders")]
Expand Down
Loading

0 comments on commit 87d11ef

Please sign in to comment.