Skip to content

Commit

Permalink
Merge pull request #115 from Tynamix/feature/RandomizerSetSeed
Browse files Browse the repository at this point in the history
Feature/randomizer set seed
  • Loading branch information
Tynamix authored Sep 25, 2018
2 parents 52e4645 + 59c2116 commit e2ab9f3
Show file tree
Hide file tree
Showing 56 changed files with 153 additions and 346 deletions.
8 changes: 3 additions & 5 deletions Tynamix.ObjectFiller.Test/AddressFillingTest.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ObjectFiller.Test.TestPoco.Person;
using Tynamix.ObjectFiller;
using Tynamix.ObjectFiller.Test.TestPoco.Person;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
using System.Linq;

[TestClass]
public class AddressFillingTest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;

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



public class Bug68HashsetCanNotBeCreated
{
[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

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


[TestClass]
public class Bug87ErrorWhenNameInParentIsSameAsParent
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;

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




public class Bug89FillTypesInheritsFromDictionary
{
public class EntityA
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;

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




public class Bug89FillTypesInheritsFromList
{
public class EntityA
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Tynamix.ObjectFiller.Test.TestPoco.Library;

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

using global::ObjectFiller.Test.TestPoco.Library;

using Microsoft.VisualStudio.TestTools.UnitTesting;

public class OrderWithObject
Expand Down
6 changes: 1 addition & 5 deletions Tynamix.ObjectFiller.Test/CityNamesPluginTest.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{


using Tynamix.ObjectFiller;

[TestClass]
public class CityNamesPluginTest
{
Expand Down
4 changes: 1 addition & 3 deletions Tynamix.ObjectFiller.Test/CollectionizerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
using System.Diagnostics;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Tynamix.ObjectFiller;


namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
public class CollectionizerPoco
{
Expand Down
3 changes: 1 addition & 2 deletions Tynamix.ObjectFiller.Test/CopyConstructorTest.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Tynamix.ObjectFiller;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
[TestClass]
public class CopyConstructorTest
Expand Down
6 changes: 1 addition & 5 deletions Tynamix.ObjectFiller.Test/CountryNamesPlugin.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{


using Tynamix.ObjectFiller;

[TestClass]
public class CountryNamesPlugin
{
Expand Down
3 changes: 1 addition & 2 deletions Tynamix.ObjectFiller.Test/CreateInstanceTest.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Tynamix.ObjectFiller;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{

public abstract class Parent
Expand Down
13 changes: 4 additions & 9 deletions Tynamix.ObjectFiller.Test/DateTimeRangeTest.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
using System;
using System.Linq;



using Tynamix.ObjectFiller;

public class DateRangeTestClass
{
public DateTime Date { get; set; }
Expand Down
4 changes: 1 addition & 3 deletions Tynamix.ObjectFiller.Test/DefaultDatatypeMappingsTest.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System;
using System.Diagnostics;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Tynamix.ObjectFiller;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
[TestClass]
public class DefaultDatatypeMappingsTest
Expand Down
3 changes: 1 addition & 2 deletions Tynamix.ObjectFiller.Test/EmailAddressesPluginTest.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System.Text.RegularExpressions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Tynamix.ObjectFiller;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
[TestClass]
public class EmailAddressesPluginTests
Expand Down
3 changes: 1 addition & 2 deletions Tynamix.ObjectFiller.Test/EnumTest.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Tynamix.ObjectFiller;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
[TestClass]
public class EnumTest
Expand Down
8 changes: 1 addition & 7 deletions Tynamix.ObjectFiller.Test/Extensions/AssertExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tynamix.Objectfiller.Test.Extensions
namespace Tynamix.ObjectFiller.Test.Extensions
{
class AssertExtensions
{
Expand Down
3 changes: 1 addition & 2 deletions Tynamix.ObjectFiller.Test/HashStackTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Tynamix.ObjectFiller;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
[TestClass]
public class HashStackTests
Expand Down
4 changes: 1 addition & 3 deletions Tynamix.ObjectFiller.Test/IpAddressPluginTest.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

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

[TestClass]
public class IpAddressPluginTest
{
Expand Down
5 changes: 2 additions & 3 deletions Tynamix.ObjectFiller.Test/LibraryFillingTest.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ObjectFiller.Test.TestPoco.Library;
using Tynamix.ObjectFiller;
using Tynamix.ObjectFiller.Test.TestPoco.Library;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
[TestClass]
public class LibraryFillingTest
Expand Down
8 changes: 3 additions & 5 deletions Tynamix.ObjectFiller.Test/ListFillingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ObjectFiller.Test.TestPoco.ListTest;
using Tynamix.ObjectFiller;
using Tynamix.ObjectFiller.Test.TestPoco;
using Tynamix.ObjectFiller.Test.TestPoco.ListTest;

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

[TestClass]
public class ListFillingTest
{
Expand Down
8 changes: 2 additions & 6 deletions Tynamix.ObjectFiller.Test/LoremIpsumPluginTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ObjectFiller.Test.TestPoco.Library;
using Tynamix.ObjectFiller;
using Tynamix.ObjectFiller.Test.TestPoco.Library;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
using System.Collections.Generic;

[TestClass]
public class LoremIpsumPluginTest
{
Expand Down
3 changes: 1 addition & 2 deletions Tynamix.ObjectFiller.Test/ObjectFillerRecursiveTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Tynamix.ObjectFiller;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
[TestClass]
public class ObjectFillerRecursiveTests
Expand Down
27 changes: 20 additions & 7 deletions Tynamix.ObjectFiller.Test/ObjectFillerTest.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ObjectFiller.Test.TestPoco.Person;
using Tynamix.ObjectFiller;
using Tynamix.ObjectFiller.Test.TestPoco.Person;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
[TestClass]
public class ObjectFillerTest
Expand All @@ -29,9 +27,6 @@ public void TestFillPerson()
Assert.IsTrue(new List<string>() { "Maik", "Tom", "Anton" }.Contains(pFilled.LastName));
}




[TestMethod]
public void CreateMultipleInstances()
{
Expand All @@ -41,5 +36,23 @@ public void CreateMultipleInstances()
Assert.IsNotNull(pList);
Assert.AreEqual(10, pList.Count());
}

[TestMethod]
public void SetRandomSeedShallGenerateSameData()
{
var filler = new Filler<Address>();

var address1 = filler.SetRandomSeed(1234).Create();

var filler2 = new Filler<Address>();

var address2 = filler2.SetRandomSeed(1234).Create();

Assert.AreEqual(address1.City, address2.City);
Assert.AreEqual(address1.Country, address2.Country);
Assert.AreEqual(address1.HouseNumber, address2.HouseNumber);
Assert.AreEqual(address1.PostalCode, address2.PostalCode);
Assert.AreEqual(address1.Street, address2.Street);
}
}
}
10 changes: 3 additions & 7 deletions Tynamix.ObjectFiller.Test/PatternGeneratorTest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using System;
using System.Reflection.Emit;

using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ObjectFiller.Test.TestPoco.Person;
using Tynamix.ObjectFiller;
using Tynamix.ObjectFiller.Test.TestPoco.Person;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
[TestClass]
public class PatternGeneratorTest
Expand Down
7 changes: 2 additions & 5 deletions Tynamix.ObjectFiller.Test/PersonFillingTest.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ObjectFiller.Test.TestPoco.Person;
using Tynamix.ObjectFiller;
using Random = Tynamix.ObjectFiller.Random;
using Tynamix.ObjectFiller.Test.TestPoco.Person;

namespace ObjectFiller.Test
namespace Tynamix.ObjectFiller.Test
{
[TestClass]
public class PersonFillingTest
Expand Down
Loading

0 comments on commit e2ab9f3

Please sign in to comment.