mirror of
https://github.com/dnpm-dip/mv64e-mtb-dto-dotnet.git
synced 2025-07-01 10:22:54 +00:00
Initial commit
This commit is contained in:
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
*.user
|
||||
|
||||
.idea/
|
||||
TestResults/
|
||||
|
||||
*/bin/
|
||||
*/obj/
|
21
LICENSE.txt
Normal file
21
LICENSE.txt
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Paul-Christian Volkmer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
40
MV64e.MTB.Test/MV64e.MTB.Test.csproj
Normal file
40
MV64e.MTB.Test/MV64e.MTB.Test.csproj
Normal file
@ -0,0 +1,40 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<LangVersion>10</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
|
||||
<PackageReference Include="NUnit" Version="3.14.0"/>
|
||||
<PackageReference Include="NUnit.Analyzers" Version="3.9.0"/>
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="NUnit.Framework"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MV64e.MTB\MV64e.MTB.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="TestData\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="TestData\mv64e-mtb-fake-patient.json" />
|
||||
<EmbeddedResource Include="TestData\mv64e-mtb-fake-patient.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
23
MV64e.MTB.Test/MtbTest.cs
Normal file
23
MV64e.MTB.Test/MtbTest.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace MV64e.MTB.Test;
|
||||
|
||||
public class MtbTest
|
||||
{
|
||||
[Test]
|
||||
public void ShouldParseJsonData()
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
const string resourceName = @"MV64e.MTB.Test.TestData.mv64e-mtb-fake-patient.json";
|
||||
|
||||
using var stream = assembly.GetManifestResourceStream(resourceName);
|
||||
Debug.Assert(stream != null, "Cannot find test data file");
|
||||
using var reader = new StreamReader(stream);
|
||||
|
||||
var json = reader.ReadToEnd();
|
||||
var mtb = Mtb.FromJson(json);
|
||||
|
||||
Assert.IsNotNull(mtb);
|
||||
}
|
||||
}
|
1
MV64e.MTB.Test/TestData/mv64e-mtb-fake-patient.json
Normal file
1
MV64e.MTB.Test/TestData/mv64e-mtb-fake-patient.json
Normal file
File diff suppressed because one or more lines are too long
13
MV64e.MTB/MV64e.MTB.csproj
Normal file
13
MV64e.MTB/MV64e.MTB.csproj
Normal file
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>10</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
2514
MV64e.MTB/Mtb.cs
Normal file
2514
MV64e.MTB/Mtb.cs
Normal file
File diff suppressed because it is too large
Load Diff
9
README.md
Normal file
9
README.md
Normal file
@ -0,0 +1,9 @@
|
||||
# DNPM:DIP MTB Data-Transfer-Objects for .NET
|
||||
|
||||
Serialization and deserialization of DNPM:DIP MTB DTOs for .NET using the C# programming language.
|
||||
|
||||
This crate provides DNPM:DIP data model for use with "Modellvorhaben gem. §64e SGB V"
|
||||
|
||||
## Usage notices
|
||||
|
||||
This library uses `NewtonSoft.Json` to handle JSON strings.
|
22
mv64e-mtb-dto-dotnet.sln
Normal file
22
mv64e-mtb-dto-dotnet.sln
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MV64e.MTB", "MV64e.MTB\MV64e.MTB.csproj", "{AA08ED31-46FE-4DE0-97EC-F09357CDF44A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MV64e.MTB.Test", "MV64e.MTB.Test\MV64e.MTB.Test.csproj", "{C10B9692-A326-4FB8-8D81-1B3FB9E915F7}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AA08ED31-46FE-4DE0-97EC-F09357CDF44A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AA08ED31-46FE-4DE0-97EC-F09357CDF44A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AA08ED31-46FE-4DE0-97EC-F09357CDF44A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AA08ED31-46FE-4DE0-97EC-F09357CDF44A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C10B9692-A326-4FB8-8D81-1B3FB9E915F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C10B9692-A326-4FB8-8D81-1B3FB9E915F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C10B9692-A326-4FB8-8D81-1B3FB9E915F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C10B9692-A326-4FB8-8D81-1B3FB9E915F7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Reference in New Issue
Block a user