Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ObjectFiller.Test.BugfixTests
{
using Tynamix.ObjectFiller;

using Xunit;

public class Bug68HashsetCanNotBeCreated
{
[Fact]
public void AHashsetShouldBeGenerated()
{
Filler<HashSet<string>> filler = new Filler<HashSet<string>>();

var hashset = filler.Create();

Assert.NotNull(hashset);
Assert.True(hashset.Any());
}
}
}
6 changes: 5 additions & 1 deletion Tynamix.ObjectFiller.Test/ListFillingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public void TestFillAllListsExceptArray()
Assert.NotNull(entity.EntityICollection);
Assert.NotNull(entity.EntityIEnumerable);
Assert.NotNull(entity.EntityIList);
Assert.NotNull(entity.EntityHashset);

}

[Fact]
Expand Down Expand Up @@ -64,7 +66,7 @@ public void TestFillList()
Assert.NotNull(entity.EntityIEnumerable);
Assert.NotNull(entity.EntityIList);
Assert.NotNull(entity.EntityArray);

Assert.NotNull(entity.EntityHashset);
}

[Fact]
Expand All @@ -79,6 +81,7 @@ public void TestIgnoreAllUnknownTypesWithOutException()
Assert.NotNull(entity.EntityICollection);
Assert.NotNull(entity.EntityIEnumerable);
Assert.NotNull(entity.EntityIList);
Assert.NotNull(entity.EntityHashset);
}

[Fact]
Expand Down Expand Up @@ -117,6 +120,7 @@ public void GenerateTestDataForASimpleList()
Assert.True(entityCollection.EntityIEnumerable.Any());
Assert.True(entityCollection.EntityIList.Any());
Assert.True(entityCollection.EntityList.Any());
Assert.NotNull(entityCollection.EntityHashset.Any());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class EntityCollection

public IList<Entity> EntityIList { get; set; }

public HashSet<Entity> EntityHashset { get; set; }

public Entity[,] EntityArray { get; set; }
}
}
21 changes: 7 additions & 14 deletions Tynamix.ObjectFiller.Test/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,18 @@
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",

"commands": {
"test": "xunit.runner.dnx"
},

"frameworks": {
"dnxcore50": {
"compilationOptions": {"define": ["NETSTD"]}
},
"dnx451": {
"compilationOptions": { "define": [ "NET4X" ] }
"compilationOptions": { "define": [ "NET4X" ] },
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.dnx": "2.1.0-rc1-build204",
"System.Text.RegularExpressions": "4.0.11-beta-23516",
"Tynamix.ObjectFiller": "1.4.2"
}
}

},

"dependencies": {
"xunit": "2.1.0",
"xunit.runner.dnx": "2.1.0-rc1-build204",
"System.Text.RegularExpressions": "4.0.11-beta-23516",
"Tynamix.ObjectFiller": "1.4.1"
}
}
Loading