-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* development: Bump version to 2.2.2 Cleaned up docs Marked AddKey(string, KeyData) method obsolete; use AddKey(KeyData) Add tests to prevent similar bugs as found in #83 when adding keys Fixes #83
- Loading branch information
Showing
6 changed files
with
125 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/IniFileParser.Tests/Unit/Model/KeyDataCollectionTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using IniParser.Model; | ||
using NUnit.Framework; | ||
|
||
namespace IniFileParser.Tests.Unit.Model | ||
{ | ||
[TestFixture, Category("Test of data structures used to hold information retrieved for an INI file")] | ||
public class KeyDataCollectionTests | ||
{ | ||
[Test] | ||
public void test() | ||
{ | ||
var col = new KeyDataCollection(); | ||
col.AddKey("key1"); | ||
|
||
Assert.That(col["key1"], Is.Empty); | ||
|
||
|
||
col.AddKey("key2", "value2"); | ||
|
||
Assert.That(col["key2"], Is.EqualTo("value2")); | ||
|
||
var keyData = new KeyData("key3"); | ||
keyData.Value = "value3"; | ||
col.AddKey(keyData); | ||
|
||
Assert.That(col["key3"], Is.EqualTo("value3")); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters