Changeset 8635


Ignore:
Timestamp:
Feb 18, 2020, 4:13:20 PM (2 years ago)
Author:
kopal
Message:

UnitTests:

  • fixed broken unit tests, which broke, due to changes in components
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/AnalysisMonoalphabeticSubstitution/Properties/Resources.Designer.cs

    r8634 r8635  
    389389        ///ciphertext alphabet: "{0}" ({1} letters)
    390390        ///plaintext alphabet: "{2}" ({3} letters)
    391         ///Using plaintext alphabet now also as ciphertex alphabet. ähnelt.
     391        ///Using plaintext alphabet now also as ciphertext alphabet. ähnelt.
    392392        /// </summary>
    393393        public static string error_alphabet_length {
  • trunk/CrypPlugins/AnalysisMonoalphabeticSubstitution/Properties/Resources.resx

    r8634 r8635  
    290290ciphertext alphabet: "{0}" ({1} letters)
    291291plaintext alphabet: "{2}" ({3} letters)
    292 Using plaintext alphabet now also as ciphertex alphabet.</value>
     292Using plaintext alphabet now also as ciphertext alphabet.</value>
    293293  </data>
    294294  <data name="error_ciphertext" xml:space="preserve">
  • trunk/CrypPlugins/Wizard/Config/EnDeCrypt/wizard.config.classicEnDe.xml

    r7982 r8635  
    386386      <defaultvalue lang="de">Wir wurden entdeckt, sofortiger Rückzug!</defaultvalue>
    387387    </inputBox>
    388     <inputBox plugin="Playfair" property="Key" alignment="Left" width="30%" visibleLines="1" group="InputGroup">
     388    <inputBox plugin="Playfair" property="KeyPhraseString" alignment="Left" width="30%" visibleLines="1" group="InputGroup">
    389389      <description lang="en">Key:</description>
    390390      <description lang="ru">Ключ:</description>
  • trunk/LibSource/KeyTextBox/KeyTextBox.csproj

    r8187 r8635  
    7878  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Test|x64'">
    7979    <DebugSymbols>true</DebugSymbols>
    80     <OutputPath>..\..\..\CrypBuild\Test\</OutputPath>
     80    <OutputPath>..\..\CrypBuild\Test\</OutputPath>
    8181    <DefineConstants>DEBUG;TRACE</DefineConstants>
    8282    <DebugType>full</DebugType>
  • trunk/LibSource/OpenCLNet/OpenCLNet.csproj

    r8187 r8635  
    6565  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Test|x64'">
    6666    <DebugSymbols>true</DebugSymbols>
    67     <OutputPath>..\..\..\CrypBuild\Test\</OutputPath>
     67    <OutputPath>..\..\CrypBuild\Test\</OutputPath>
    6868    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6969    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  • trunk/UnitTests/EnigmaTest.cs

    r8109 r8635  
    1919            foreach (TestVector vector in testvectors)
    2020            {
     21                pluginInstance.PreExecution();
    2122                output = scenario.GetOutputs(new object[] { vector.input, vector.model, vector.key, vector.rot1, vector.rot2, vector.rot3, vector.rot4, vector.ukw, vector.ring1, vector.ring2, vector.ring3, vector.ring4, vector.plugBoard }, false);
    2223                Assert.AreEqual(vector.output.ToUpper(), (string)output[0], "Unexpected value in test #" + vector.n + ".");
     24                pluginInstance.PostExecution();
    2325            }
    2426        }
  • trunk/UnitTests/PlayfairTest.cs

    r8109 r8635  
    1414        {
    1515            var pluginInstance = TestHelpers.GetPluginInstance("Playfair");
    16             var scenario = new PluginTestScenario(pluginInstance, new[] { "InputString", ".Key", ".MatrixSize" }, new[] { "OutputString" });
     16            var scenario = new PluginTestScenario(pluginInstance, new[] { "InputString", ".KeyPhraseString", ".MatrixSize" }, new[] { "OutputString" });
    1717            object[] output;
    1818
  • trunk/UnitTests/UnitTests.csproj

    r8557 r8635  
    9191  </PropertyGroup>
    9292  <ItemGroup>
    93     <Reference Include="ExtendedNTL">
    94       <HintPath>..\..\..\trunk\Lib\ExtendedNTL.dll</HintPath>
    95       <Private>True</Private>
    96     </Reference>
    9793    <Reference Include="ISAPCommitmentScheme">
    9894      <HintPath>..\Lib\ISAPCommitmentScheme.dll</HintPath>
  • trunk/UnitTests/WizardConfigTest.cs

    r8109 r8635  
    5454            var modelLoader = new ModelPersistance();
    5555            modelLoader.OnGuiLogNotificationOccured += (sender, args) => LogHandler(args.NotificationLevel, file);
    56 
    57             var model = modelLoader.loadModel(Path.Combine(_templateDirectory.FullName, file), false);
     56            WorkspaceModel model = null;
     57
     58            try
     59            {
     60                model = modelLoader.loadModel(Path.Combine(_templateDirectory.FullName, file), false);
     61            }
     62            catch (Exception ex)
     63            {
     64                Assert.Fail(string.Format("Exception during loading of model {0}: {1}", file, ex.Message));
     65            }
    5866            model.OnGuiLogNotificationOccured += (sender, args) => LogHandler(args.NotificationLevel, file);
    5967
Note: See TracChangeset for help on using the changeset viewer.