Corrected some tests

Minor code refactor
Main page now correctly shows save page even when opening a DB from Explorer
This commit is contained in:
2018-09-12 12:58:32 +02:00
parent 38e2d1ac51
commit d341535d60
11 changed files with 50 additions and 56 deletions

View File

@@ -23,7 +23,7 @@ namespace ModernKeePassLib.Test.Keys
"\t\t<Data>";
private const string ExpectedFileEnd = "\t</Key>\r\n" +
"</KeyFile>\r\n";
"</KeyFile>";
[TestMethod]
public void TestConstruct()
@@ -70,7 +70,7 @@ namespace ModernKeePassLib.Test.Keys
{
var fileContents = FileIO.ReadTextAsync(file).GetAwaiter().GetResult();
Assert.AreEqual(fileContents.Length, 187);
Assert.AreEqual(185, fileContents.Length);
Assert.IsTrue(fileContents.StartsWith(ExpectedFileStart));
Assert.IsTrue(fileContents.EndsWith(ExpectedFileEnd));
}

View File

@@ -148,8 +148,12 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.2.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\packages\Portable.BouncyCastle.1.8.2\lib\netstandard1.0\BouncyCastle.Crypto.dll</HintPath>
<Reference Include="BouncyCastle.Crypto, Version=1.8.3.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\packages\Portable.BouncyCastle.1.8.3\lib\netstandard1.0\BouncyCastle.Crypto.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ModernKeePassLib, Version=2.39.1.22027, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ModernKeePassLib.2.39.1\lib\netstandard1.2\ModernKeePassLib.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Splat, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
@@ -183,12 +187,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ModernKeePassLib\ModernKeePass.Lib.csproj">
<Project>{2e710089-9559-4967-846c-e763dd1f3acb}</Project>
<Name>ModernKeePass.Lib</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.NETCore.Platforms" version="2.1.0" targetFramework="win81" />
<package id="Microsoft.NETCore.Platforms" version="2.1.1" targetFramework="win81" />
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.2" targetFramework="win81" />
<package id="ModernKeePassLib" version="2.38.2" targetFramework="win81" />
<package id="ModernKeePassLib" version="2.39.1" targetFramework="win81" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="win81" />
<package id="Portable.BouncyCastle" version="1.8.2" targetFramework="win81" />
<package id="Portable.BouncyCastle" version="1.8.3" targetFramework="win81" />
<package id="Splat" version="3.0.0" targetFramework="win81" />
<package id="System.Collections" version="4.3.0" targetFramework="win81" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="win81" />