init
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<section name="MessageBroker" type="Kreta.MessageBroker.Configuration.MessageBrokerConfigurationSection, Kreta.MessageBroker" />
|
||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
|
||||
</configSections>
|
||||
|
||||
<MessageBroker>
|
||||
<Clients>
|
||||
<Client Name="StudentMobileNotification" QueueSize="10000" CreateNewClientAfterErrorsCount="20" ClientPoolSize="8" EnableLogging="true" LoggerType="Serilog" MessageSignatureKey="Z2Ph4ZpLiMLtA5GYwDFBS8XSi6GHstRpj3uJdORV7XsKRsgQsmiZFkonbRNTRqluDTTQKTRK0nhr9fSpA10TfQ==">
|
||||
<SerilogLogger LossyBufferSize="10000">
|
||||
<ElasticSearch UseCustomBackOffLogic="true" NodeUris="http://elasticsearch.ekreta-dev.hu:9200/" IndexFormat="kreta_mobilenotification_messagelog_serilog-{0:yyyy.MM.dd}" MinimumLogEventLevel="Information" ConnectionTimeoutInSeconds="30" WaitBetweenForCheckingEventBatchesInSeconds="1" BatchPostingLimit="300" AutoRegisterTemplateVersion="ESv7" />
|
||||
</SerilogLogger>
|
||||
</Client>
|
||||
</Clients>
|
||||
<EventHubs>
|
||||
<EventHub Name="StudentMobileNotification" ConnectionString="Endpoint=sb://kretaeventhubdev.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=LiWDajLQida3EgEWdbd28TS/gKqmxjsPiKVUtKMJ8Ww=" EntityPath="notificationtest" />
|
||||
</EventHubs>
|
||||
</MessageBroker>
|
||||
|
||||
<log4net>
|
||||
|
||||
<logger name="MobileNotificationMessageLogger">
|
||||
<level value="ALL" />
|
||||
<appender-ref ref="MobileNotificationMessageAsyncBufferingForwarder" />
|
||||
</logger>
|
||||
<appender name="MobileNotificationMessageAsyncBufferingForwarder" type="Easy.Logger.AsyncBufferingForwardingAppender, Easy.Logger">
|
||||
<bufferSize value="16384" />
|
||||
<lossy value="true" />
|
||||
<Fix value="508" />
|
||||
<evaluator type="log4net.Core.LevelEvaluator">
|
||||
<threshold value="ALL" />
|
||||
</evaluator>
|
||||
<appender-ref ref="MobileNotificationMessageElasticSearchAppender" />
|
||||
</appender>
|
||||
<appender name="MobileNotificationMessageElasticSearchAppender" type="log4net.ElasticSearch.ElasticSearchAppender, log4net.ElasticSearch">
|
||||
<lossy value="false" />
|
||||
<Fix value="508" />
|
||||
<bufferSize value="1" />
|
||||
<connectionString value="Scheme=http;Server=elasticsearch.ekreta-dev.hu;Index=kreta_mobilenotification_messagelog;Port=9200;rolling=true" />
|
||||
<evaluator type="log4net.Core.LevelEvaluator">
|
||||
<threshold value="ALL" />
|
||||
</evaluator>
|
||||
</appender>
|
||||
</log4net>
|
||||
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.1.0" newVersion="5.2.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="SimpleInjector" publicKeyToken="984cb50dea722e99" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Core.MessageBroker.Contract.MobileNotification;
|
||||
using Kreta.Core.MessageBroker.Contract.MobileNotification.Enum;
|
||||
using Kreta.MessageBroker.Client.MobileNotification;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Kreta.MessageBroker.Tests.IntegrationTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class MobileNotificationMessageClientTests
|
||||
{
|
||||
[Test]
|
||||
public void SendStudentMobileNotificationMessageValid()
|
||||
{
|
||||
for (int i = 1; i <= 1200; i++)
|
||||
{
|
||||
MobileNotificationMessageHelper.PostStudentNotification("biatorbagyi__", 1, MobileNotificationMessageType.Absence, i, $"Absence test {i}");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SendStudentMobileNotificationMessagesValid()
|
||||
{
|
||||
var messages = new List<MobileNotificationMessage>();
|
||||
|
||||
for (int i = 1; i <= 1200; i++)
|
||||
{
|
||||
messages.Add(MobileNotificationMessageHelper.CreateMessage("biatorbagyi__", 1, MobileNotificationMessageType.Absence, i, $"Absence test {i}"));
|
||||
}
|
||||
|
||||
MobileNotificationMessageHelper.PostStudentNotification(messages.ToArray());
|
||||
}
|
||||
|
||||
static MobileNotificationMessageClientTests()
|
||||
{
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\NUnit3TestAdapter.3.9.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.9.0\build\net35\NUnit3TestAdapter.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{E2D1CAC1-4C67-4A12-A1A6-166A2F9F2324}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Kreta.MessageBroker.Tests</RootNamespace>
|
||||
<AssemblyName>Kreta.MessageBroker.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
|
||||
<IsCodedUITest>False</IsCodedUITest>
|
||||
<TestProjectType>UnitTest</TestProjectType>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Easy.Logger, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Easy.Logger.3.2.0\lib\net40\Easy.Logger.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Easy.Logger.Interfaces, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Easy.Logger.Interfaces.1.1.0\lib\net40\Easy.Logger.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.MessageBroker, Version=3.0.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Kreta.Core.MessageBroker.3.0.8\lib\netstandard2.0\Kreta.Core.MessageBroker.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.MessageBroker.Contract, Version=3.0.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Kreta.Core.MessageBroker.Contract.3.0.8\lib\netstandard2.0\Kreta.Core.MessageBroker.Contract.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net.ElasticSearch, Version=2.3.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.ElasticSearch.2.3.6\lib\net45\log4net.ElasticSearch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Tools\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="IntegrationTests\MobileNotificationMessageClientTests.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Kreta.MessageBroker\Kreta.MessageBroker.csproj">
|
||||
<Project>{28CC34C7-0A89-4A33-BA89-8952FFEB2F9E}</Project>
|
||||
<Name>Kreta.MessageBroker</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.9.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.9.0\build\net35\NUnit3TestAdapter.props'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Easy.Logger" version="3.2.0" targetFramework="net48" />
|
||||
<package id="Easy.Logger.Interfaces" version="1.1.0" targetFramework="net48" />
|
||||
<package id="Kreta.Core.MessageBroker" version="3.0.8" targetFramework="net48" />
|
||||
<package id="Kreta.Core.MessageBroker.Contract" version="3.0.8" targetFramework="net48" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net48" />
|
||||
<package id="log4net.ElasticSearch" version="2.3.6" targetFramework="net48" />
|
||||
<package id="Meziantou.Analyzer" version="1.0.688" targetFramework="net48" developmentDependency="true" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="NUnit" version="3.9.0" targetFramework="net48" />
|
||||
<package id="NUnit.ConsoleRunner" version="3.7.0" targetFramework="net48" />
|
||||
<package id="NUnit3TestAdapter" version="3.9.0" targetFramework="net48" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user