Skip to content

Commit

Permalink
feat(issue-91): add smart-subscription service
Browse files Browse the repository at this point in the history
Merge pull request #240 from live-dev999/live-dev999/issue91
  • Loading branch information
live-dev999 committed Mar 26, 2022
2 parents 1149e1e + b5ad1c2 commit 248b433
Show file tree
Hide file tree
Showing 24 changed files with 460 additions and 0 deletions.
82 changes: 82 additions & 0 deletions src/Services/smart-subscriber/O2NextGen.SmartSubscriber.Api.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "O2NextGen.SmartSubscriber.Api", "O2NextGen.SmartSubscriber.Api\O2NextGen.SmartSubscriber.Api.csproj", "{DE15D281-4ACD-482F-9323-BA06E53E86E0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "O2NextGen.SmartSubscriber.Data", "O2NextGen.SmartSubscriber.Data\O2NextGen.SmartSubscriber.Data.csproj", "{860DF0EC-01B1-4022-BDAD-3ADADD7CAD8E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "O2NextGen.SmartSubscriber.Business", "O2NextGen.SmartSubscriber.Business\O2NextGen.SmartSubscriber.Business.csproj", "{246C4D42-4008-402A-8BD2-90250840B906}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "O2NextGen.SmartSubscriber.Impl", "O2NextGen.SmartSubscriber.Impl\O2NextGen.SmartSubscriber.Impl.csproj", "{6B83709F-FAF9-4144-8311-58B989FC4767}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{BD99560F-E175-44CE-B384-BDF4515C7DB6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.O2NextGen.SmartSubscriber.Api", "Tests\Tests.O2NextGen.SmartSubscriber.Api\Tests.O2NextGen.SmartSubscriber.Api.csproj", "{20D4431B-5013-45F1-9AF0-47C2CE084D87}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.O2NextGen.SmartSubscriber.Business", "Tests\Tests.O2NextGen.SmartSubscriber.Business\Tests.O2NextGen.SmartSubscriber.Business.csproj", "{C74D52BB-491F-475B-AE72-E8CC296C6527}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.O2NextGen.SmartSubscriber.Data", "Tests\Tests.O2NextGen.SmartSubscriber.Data\Tests.O2NextGen.SmartSubscriber.Data.csproj", "{448398BA-496F-4CCD-93C9-B2271C8C6DB1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.O2NextGen.SmartSubscriber.Impl", "Tests\Tests.O2NextGen.SmartSubscriber.Impl\Tests.O2NextGen.SmartSubscriber.Impl.csproj", "{2CB74D97-F7F9-4920-85FA-38F539BF3949}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationTests.O2NextGen.SmartSubscriber.Api", "Tests\IntegrationTests.O2NextGen.SmartSubscriber.Api\IntegrationTests.O2NextGen.SmartSubscriber.Api.csproj", "{225EFEC4-B5D6-4886-864A-C0CD23DA709A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DE15D281-4ACD-482F-9323-BA06E53E86E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE15D281-4ACD-482F-9323-BA06E53E86E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE15D281-4ACD-482F-9323-BA06E53E86E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE15D281-4ACD-482F-9323-BA06E53E86E0}.Release|Any CPU.Build.0 = Release|Any CPU
{860DF0EC-01B1-4022-BDAD-3ADADD7CAD8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{860DF0EC-01B1-4022-BDAD-3ADADD7CAD8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{860DF0EC-01B1-4022-BDAD-3ADADD7CAD8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{860DF0EC-01B1-4022-BDAD-3ADADD7CAD8E}.Release|Any CPU.Build.0 = Release|Any CPU
{246C4D42-4008-402A-8BD2-90250840B906}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{246C4D42-4008-402A-8BD2-90250840B906}.Debug|Any CPU.Build.0 = Debug|Any CPU
{246C4D42-4008-402A-8BD2-90250840B906}.Release|Any CPU.ActiveCfg = Release|Any CPU
{246C4D42-4008-402A-8BD2-90250840B906}.Release|Any CPU.Build.0 = Release|Any CPU
{6B83709F-FAF9-4144-8311-58B989FC4767}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B83709F-FAF9-4144-8311-58B989FC4767}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B83709F-FAF9-4144-8311-58B989FC4767}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B83709F-FAF9-4144-8311-58B989FC4767}.Release|Any CPU.Build.0 = Release|Any CPU
{20D4431B-5013-45F1-9AF0-47C2CE084D87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20D4431B-5013-45F1-9AF0-47C2CE084D87}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20D4431B-5013-45F1-9AF0-47C2CE084D87}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20D4431B-5013-45F1-9AF0-47C2CE084D87}.Release|Any CPU.Build.0 = Release|Any CPU
{C74D52BB-491F-475B-AE72-E8CC296C6527}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C74D52BB-491F-475B-AE72-E8CC296C6527}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C74D52BB-491F-475B-AE72-E8CC296C6527}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C74D52BB-491F-475B-AE72-E8CC296C6527}.Release|Any CPU.Build.0 = Release|Any CPU
{448398BA-496F-4CCD-93C9-B2271C8C6DB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{448398BA-496F-4CCD-93C9-B2271C8C6DB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{448398BA-496F-4CCD-93C9-B2271C8C6DB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{448398BA-496F-4CCD-93C9-B2271C8C6DB1}.Release|Any CPU.Build.0 = Release|Any CPU
{2CB74D97-F7F9-4920-85FA-38F539BF3949}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2CB74D97-F7F9-4920-85FA-38F539BF3949}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2CB74D97-F7F9-4920-85FA-38F539BF3949}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2CB74D97-F7F9-4920-85FA-38F539BF3949}.Release|Any CPU.Build.0 = Release|Any CPU
{225EFEC4-B5D6-4886-864A-C0CD23DA709A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{225EFEC4-B5D6-4886-864A-C0CD23DA709A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{225EFEC4-B5D6-4886-864A-C0CD23DA709A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{225EFEC4-B5D6-4886-864A-C0CD23DA709A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{20D4431B-5013-45F1-9AF0-47C2CE084D87} = {BD99560F-E175-44CE-B384-BDF4515C7DB6}
{C74D52BB-491F-475B-AE72-E8CC296C6527} = {BD99560F-E175-44CE-B384-BDF4515C7DB6}
{448398BA-496F-4CCD-93C9-B2271C8C6DB1} = {BD99560F-E175-44CE-B384-BDF4515C7DB6}
{2CB74D97-F7F9-4920-85FA-38F539BF3949} = {BD99560F-E175-44CE-B384-BDF4515C7DB6}
{225EFEC4-B5D6-4886-864A-C0CD23DA709A} = {BD99560F-E175-44CE-B384-BDF4515C7DB6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {926D1FBB-9A45-4C4B-9FDD-9CC960F32CA7}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;

namespace O2NextGen.SmartSubscriber.Api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class ValuesController : ControllerBase
{
// GET api/values
[HttpGet]
public ActionResult<IEnumerable<string>> Get()
{
return new string[] { "value1", "value2" };
}

// GET api/values/5
[HttpGet("{id}")]
public ActionResult<string> Get(int id)
{
return "value";
}

// POST api/values
[HttpPost]
public void Post([FromBody] string value)
{
}

// PUT api/values/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] string value)
{
}

// DELETE api/values/5
[HttpDelete("{id}")]
public void Delete(int id)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\O2NextGen.SmartSubscriber.Business\O2NextGen.SmartSubscriber.Business.csproj" />
<ProjectReference Include="..\O2NextGen.SmartSubscriber.Data\O2NextGen.SmartSubscriber.Data.csproj" />
<ProjectReference Include="..\O2NextGen.SmartSubscriber.Impl\O2NextGen.SmartSubscriber.Impl.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;

namespace O2NextGen.SmartSubscriber.Api
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}

public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:63990",
"sslPort": 44396
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "api/values",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"O2NextGen.SmartSubscriber.Api": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api/values",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace O2NextGen.SmartSubscriber.Api
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}

public IConfiguration Configuration { get; }

// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseHsts();
}

app.UseHttpsRedirection();
app.UseMvc();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace O2NextGen.SmartSubscriber.Business
{
public class Class1
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace O2NextGen.SmartSubscriber.Data
{
public class Class1
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace O2NextGen.SmartSubscriber.Impl
{
public class Class1
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Xunit;

namespace IntegrationTests.O2NextGen.SmartSubscriber.Api
{
public class UnitTest1
{
[Fact]
public void Test1()
{

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
<PackageReference Include="coverlet.collector" Version="3.1.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using NUnit.Framework;

namespace Tests.O2NextGen.SmartSubscriber.Api
{
public class Tests
{
[SetUp]
public void Setup()
{
}

[Test]
public void Test1()
{
Assert.Pass();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
<PackageReference Include="coverlet.collector" Version="3.1.0" />
</ItemGroup>

</Project>
Loading

0 comments on commit 248b433

Please sign in to comment.