Skip to content

Commit 6377f17

Browse files
authored
Merge pull request #65 from TestStack/netstandard20
netstandard 2.0
2 parents 704d76f + 43b7250 commit 6377f17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+226
-529
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ _ReSharper.*
1111
packages
1212
*.DotSettings
1313
*.ncrunchproject
14-
*.ncrunchsolution
14+
*.ncrunchsolution
15+
16+
# Visual Studio 2015 cache/options directory
17+
.vs/

NuGet.config

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5+
</packageSources>
6+
</configuration>

TestStack.Dossier.Tests/Assembly.cs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
using Xunit;
2+
3+
[assembly: CollectionBehavior(DisableTestParallelization = true)]

TestStack.Dossier.Tests/Builder_CreateListTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ public void WhenBuildingObjectsImplicitly_ThenTheAnonymousValueFixtureIsSharedAc
170170
studentViewModels.Select(x => x.Grade).ShouldBeUnique();
171171
}
172172

173+
[Fact]
173174
public void WhenBuildingObjectsWithCtorAndPrivateSetters_ThenSetPrivateSettersByDefault()
174175
{
175176
var dto = Builder<MixedAccessibilityDto>.CreateListOfSize(1)

TestStack.Dossier.Tests/DataSources/DataSourceConventionTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
using Shouldly;
44
using TestStack.Dossier.DataSources;
55
using TestStack.Dossier.DataSources.Dictionaries;
6-
using Xunit.Extensions;
6+
using Xunit;
77

88
namespace TestStack.Dossier.Tests.DataSources
99
{
1010
public class DataSourceConventionTests
1111
{
1212
[Theory]
13-
[PropertyData("TestCases")]
13+
[MemberData(nameof(TestCases))]
1414
public void DataSourceConventions(DataSource<string> sut, int expectedCount)
1515
{
1616
var collection = sut.Data.ToList();

TestStack.Dossier.Tests/DataSources/Dictionaries/Resources/FileDataConventions.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class FileDataConventions
1313
[Fact]
1414
public void ApplyConventions()
1515
{
16-
var assembly = typeof(IAnonymousValueSupplier).Assembly;
16+
var assembly = typeof(IAnonymousValueSupplier).GetTypeInfo().Assembly;
1717
var resources = assembly
1818
.GetManifestResourceNames()
1919
.Where(x => x.EndsWith(".txt"))
@@ -27,7 +27,7 @@ public void ApplyConventions()
2727
}
2828
}
2929

30-
public void Should_not_contain_duplicates(List<string> collection, string fileName)
30+
private void Should_not_contain_duplicates(List<string> collection, string fileName)
3131
{
3232
var duplicates = collection
3333
.GroupBy(x => x)
@@ -43,7 +43,7 @@ public void Should_not_contain_duplicates(List<string> collection, string fileNa
4343
}
4444
}
4545

46-
public void Should_not_contain_null_or_empty_values(List<string> collection, string fileName)
46+
private void Should_not_contain_null_or_empty_values(List<string> collection, string fileName)
4747
{
4848
var blanks = collection.Where(string.IsNullOrEmpty).ToList();
4949
if (blanks.Any())

TestStack.Dossier.Tests/DataSources/Generators/RandomGeneratorTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using Shouldly;
44
using TestStack.Dossier.DataSources.Generators;
55
using Xunit;
6-
using Xunit.Extensions;
76

87
namespace TestStack.Dossier.Tests.DataSources.Generators
98
{

TestStack.Dossier.Tests/DataSources/Generators/SequentiaGeneratorTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Shouldly;
33
using TestStack.Dossier.DataSources.Generators;
44
using Xunit;
5-
using Xunit.Extensions;
65

76
namespace TestStack.Dossier.Tests.DataSources.Generators
87
{

TestStack.Dossier.Tests/EquivalenceClasses/AddressAusEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/EquivalenceClasses/AddressUkEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/EquivalenceClasses/AddressUsEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/EquivalenceClasses/ColourEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/EquivalenceClasses/CompanyEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/EquivalenceClasses/FinanceEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/EquivalenceClasses/FrequencyEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/EquivalenceClasses/GeoEquivalenceClassesTests.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
44
using TestStack.Dossier.EquivalenceClasses.Geo;
5-
using Xunit.Extensions;
5+
using Xunit;
66

77
namespace TestStack.Dossier.Tests.EquivalenceClasses
88
{
@@ -22,11 +22,11 @@ protected override List<object[]> GetData()
2222
{
2323
return new List<object[]>
2424
{
25-
new object[] {new Words(FromDictionary.GeoContinent), GenerateTestCasesForSut(Any.Continent)},
26-
new object[] {new Words(FromDictionary.GeoCountry), GenerateTestCasesForSut(Any.Country)},
27-
new object[] {new Words(FromDictionary.GeoCountryCode), GenerateTestCasesForSut(Any.CountryCode)},
28-
new object[] {new Words(FromDictionary.GeoLatitude), GenerateTestCasesForSut(Any.Latitude)},
29-
new object[] {new Words(FromDictionary.GeoLongitude), GenerateTestCasesForSut(Any.Longitude)},
25+
new object[] {new Words(FromDictionary.GeoContinent), GenerateTestCasesForSut(Any.Geography.Continent)},
26+
new object[] {new Words(FromDictionary.GeoCountry), GenerateTestCasesForSut(Any.Geography.Country)},
27+
new object[] {new Words(FromDictionary.GeoCountryCode), GenerateTestCasesForSut(Any.Geography.CountryCode)},
28+
new object[] {new Words(FromDictionary.GeoLatitude), GenerateTestCasesForSut(Any.Geography.Latitude)},
29+
new object[] {new Words(FromDictionary.GeoLongitude), GenerateTestCasesForSut(Any.Geography.Longitude)},
3030
};
3131
}
3232
}

TestStack.Dossier.Tests/EquivalenceClasses/GeoEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/EquivalenceClasses/IdentifierEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/EquivalenceClasses/IntegerEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/EquivalenceClasses/LoremIpsumEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/EquivalenceClasses/PersonEquivalenceClassesTests.cs

+11-12
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using TestStack.Dossier.DataSources.Dictionaries;
66
using TestStack.Dossier.EquivalenceClasses.Person;
77
using Xunit;
8-
using Xunit.Extensions;
98

109
namespace TestStack.Dossier.Tests.EquivalenceClasses
1110
{
@@ -26,10 +25,10 @@ public void WhenGettingUniqueEmail_ThenReturnUniqueEmailsAcrossFixtureInstances(
2625
var any2 = new AnonymousValueFixture();
2726

2827
PersonEquivalenceExtensions.InitializeUniqueEmailAddressSource();
29-
generatedValues.Add(any2.UniqueEmailAddress());
28+
generatedValues.Add(any2.Person.UniqueEmailAddress());
3029
for (var i = 0; i < source.Data.Count - 1; i++)
3130
{
32-
generatedValues.Add(Any.UniqueEmailAddress());
31+
generatedValues.Add(Any.Person.UniqueEmailAddress());
3332
}
3433

3534
generatedValues.Distinct().Count()
@@ -44,17 +43,17 @@ protected override List<object[]> GetData()
4443
return new List<object[]>
4544
{
4645
new object[]
47-
{new Words(FromDictionary.PersonEmailAddress), GenerateTestCasesForSut(Any.EmailAddress)},
48-
new object[] {new Words(FromDictionary.PersonLanguage), GenerateTestCasesForSut(Any.Language)},
46+
{new Words(FromDictionary.PersonEmailAddress), GenerateTestCasesForSut(Any.Person.EmailAddress)},
47+
new object[] {new Words(FromDictionary.PersonLanguage), GenerateTestCasesForSut(Any.Person.Language)},
4948
new object[]
50-
{new Words(FromDictionary.PersonNameFirstFemale), GenerateTestCasesForSut(Any.FemaleFirstName)},
51-
new object[] {new Words(FromDictionary.PersonNameFirst), GenerateTestCasesForSut(Any.FirstName)},
52-
new object[] {new Words(FromDictionary.PersonNameFull), GenerateTestCasesForSut(Any.FullName)},
53-
new object[] {new Words(FromDictionary.PersonNameLast), GenerateTestCasesForSut(Any.LastName)},
49+
{new Words(FromDictionary.PersonNameFirstFemale), GenerateTestCasesForSut(Any.Person.NameFirstFemale)},
50+
new object[] {new Words(FromDictionary.PersonNameFirst), GenerateTestCasesForSut(Any.Person.NameFirst)},
51+
new object[] {new Words(FromDictionary.PersonNameFull), GenerateTestCasesForSut(Any.Person.NameFull)},
52+
new object[] {new Words(FromDictionary.PersonNameLast), GenerateTestCasesForSut(Any.Person.NameLast)},
5453
new object[]
55-
{new Words(FromDictionary.PersonNameFirstMale), GenerateTestCasesForSut(Any.MaleFirstName)},
56-
new object[] {new Words(FromDictionary.PersonNameSuffix), GenerateTestCasesForSut(Any.Suffix)},
57-
new object[] {new Words(FromDictionary.PersonNameTitle), GenerateTestCasesForSut(Any.Title)},
54+
{new Words(FromDictionary.PersonNameFirstMale), GenerateTestCasesForSut(Any.Person.NameFirstMale)},
55+
new object[] {new Words(FromDictionary.PersonNameSuffix), GenerateTestCasesForSut(Any.Person.NameSuffix)},
56+
new object[] {new Words(FromDictionary.PersonNameTitle), GenerateTestCasesForSut(Any.Person.NameTitle)},
5857
};
5958
}
6059
}

TestStack.Dossier.Tests/EquivalenceClasses/PersonEquivalenceTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using TestStack.Dossier.DataSources;
55
using TestStack.Dossier.DataSources.Dictionaries;
66
using Xunit;
7-
using Xunit.Extensions;
87

98
namespace TestStack.Dossier.Tests.EquivalenceClasses
109
{

TestStack.Dossier.Tests/EquivalenceClasses/ShirtSizeEquivalenceTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using TestStack.Dossier.DataSources;
33
using TestStack.Dossier.DataSources.Dictionaries;
4-
using Xunit.Extensions;
4+
using Xunit;
55

66
namespace TestStack.Dossier.Tests.EquivalenceClasses
77
{

TestStack.Dossier.Tests/Properties/AssemblyInfo.cs

-36
This file was deleted.

TestStack.Dossier.Tests/ProxyBuilderTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace TestStack.Dossier.Tests
99
{
10-
class ProxyBuilderTests
10+
public class ProxyBuilderTests
1111
{
1212
[Fact]
1313
public void GivenClassToProxyWithNoProperties_WhenBuildingProxy_ReturnAClassWithNoReturnsValuesSet()

0 commit comments

Comments
 (0)