Translation Unit Tests -> Probleme beim Einfügen von UserRights
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -631,3 +631,4 @@ obj
|
||||
/BeWoDatabaseTerminator/BeWoDatabaseTerminator/bin/Debug
|
||||
/BeWoDatabaseTerminator/BeWoDatabaseTerminator/bin/Release
|
||||
/ReportImp/TestLWV
|
||||
/TranslationUnitTest/bin
|
||||
|
||||
@@ -39,6 +39,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wohneinheit", "Wohneinheit"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WohneinheitUnitTest", "WohneinheitUnitTest\WohneinheitUnitTest.csproj", "{7630915F-DFE4-45A4-A7B1-B6D19B0126C1}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Translation", "Translation", "{B331128C-7E9F-4BDC-B509-A8DAE1B94E5C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TranslationUnitTest", "TranslationUnitTest\TranslationUnitTest.csproj", "{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|.NET = Debug|.NET
|
||||
@@ -173,6 +177,18 @@ Global
|
||||
{7630915F-DFE4-45A4-A7B1-B6D19B0126C1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7630915F-DFE4-45A4-A7B1-B6D19B0126C1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{7630915F-DFE4-45A4-A7B1-B6D19B0126C1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Debug|.NET.Build.0 = Debug|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|.NET.Build.0 = Release|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -189,6 +205,8 @@ Global
|
||||
{47331732-DD96-4075-869F-83AA9F3F9937} = {FEB0336B-F053-40B6-92DD-7DE56AB9408A}
|
||||
{2F7893AD-34FC-40A2-838A-3D2D8596E9AC} = {CCD6B644-49E7-4A11-BD8F-607088A4AC83}
|
||||
{7630915F-DFE4-45A4-A7B1-B6D19B0126C1} = {2F7893AD-34FC-40A2-838A-3D2D8596E9AC}
|
||||
{B331128C-7E9F-4BDC-B509-A8DAE1B94E5C} = {CCD6B644-49E7-4A11-BD8F-607088A4AC83}
|
||||
{83C43FEC-233D-49EF-BD23-BF842A3EBDF5} = {B331128C-7E9F-4BDC-B509-A8DAE1B94E5C}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {5352BE53-F2FD-442F-85A8-4157599AA153}
|
||||
|
||||
28
TranslationUnitTest/EnumTranslation.cs
Normal file
28
TranslationUnitTest/EnumTranslation.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
|
||||
namespace TranslationUnitTest
|
||||
{
|
||||
[TestClass]
|
||||
public class EnumTranslation
|
||||
{
|
||||
[TestInitialize]
|
||||
public void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void UserRightType2TranslationsComplete()
|
||||
{
|
||||
var dict = EnumTranslations.UserRightType2Translations;
|
||||
foreach (UserRightType item in Enum.GetValues(typeof(UserRightType)))
|
||||
{
|
||||
if (item != UserRightType.None && !dict.ContainsKey(item))
|
||||
Assert.Fail($"UserRight \"{item}\" hat keine Übersetzung in {nameof(EnumTranslations.UserRightType2Translations)}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
20
TranslationUnitTest/Properties/AssemblyInfo.cs
Normal file
20
TranslationUnitTest/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("TranslationUnitTest")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TranslationUnitTest")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("83c43fec-233d-49ef-bd23-bf842a3ebdf5")]
|
||||
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
74
TranslationUnitTest/TranslationUnitTest.csproj
Normal file
74
TranslationUnitTest/TranslationUnitTest.csproj
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>TranslationUnitTest</RootNamespace>
|
||||
<AssemblyName>TranslationUnitTest</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.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>
|
||||
</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>
|
||||
</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="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="EnumTranslation.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Shared\Shared.csproj">
|
||||
<Project>{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}</Project>
|
||||
<Name>Shared</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<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>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets')" />
|
||||
</Project>
|
||||
5
TranslationUnitTest/packages.config
Normal file
5
TranslationUnitTest/packages.config
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MSTest.TestAdapter" version="2.1.2" targetFramework="net472" />
|
||||
<package id="MSTest.TestFramework" version="2.1.2" targetFramework="net472" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user