Skip to content

Commit

Permalink
Merge pull request #65 from TestStack/netstandard20
Browse files Browse the repository at this point in the history
netstandard 2.0
  • Loading branch information
robdmoore authored Jan 13, 2019
2 parents 704d76f + 43b7250 commit 6377f17
Show file tree
Hide file tree
Showing 46 changed files with 226 additions and 529 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ _ReSharper.*
packages
*.DotSettings
*.ncrunchproject
*.ncrunchsolution
*.ncrunchsolution

# Visual Studio 2015 cache/options directory
.vs/
6 changes: 6 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
3 changes: 3 additions & 0 deletions TestStack.Dossier.Tests/Assembly.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
using Xunit;

[assembly: CollectionBehavior(DisableTestParallelization = true)]
1 change: 1 addition & 0 deletions TestStack.Dossier.Tests/Builder_CreateListTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public void WhenBuildingObjectsImplicitly_ThenTheAnonymousValueFixtureIsSharedAc
studentViewModels.Select(x => x.Grade).ShouldBeUnique();
}

[Fact]
public void WhenBuildingObjectsWithCtorAndPrivateSetters_ThenSetPrivateSettersByDefault()
{
var dto = Builder<MixedAccessibilityDto>.CreateListOfSize(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
using Shouldly;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.DataSources
{
public class DataSourceConventionTests
{
[Theory]
[PropertyData("TestCases")]
[MemberData(nameof(TestCases))]
public void DataSourceConventions(DataSource<string> sut, int expectedCount)
{
var collection = sut.Data.ToList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class FileDataConventions
[Fact]
public void ApplyConventions()
{
var assembly = typeof(IAnonymousValueSupplier).Assembly;
var assembly = typeof(IAnonymousValueSupplier).GetTypeInfo().Assembly;
var resources = assembly
.GetManifestResourceNames()
.Where(x => x.EndsWith(".txt"))
Expand All @@ -27,7 +27,7 @@ public void ApplyConventions()
}
}

public void Should_not_contain_duplicates(List<string> collection, string fileName)
private void Should_not_contain_duplicates(List<string> collection, string fileName)
{
var duplicates = collection
.GroupBy(x => x)
Expand All @@ -43,7 +43,7 @@ public void Should_not_contain_duplicates(List<string> collection, string fileNa
}
}

public void Should_not_contain_null_or_empty_values(List<string> collection, string fileName)
private void Should_not_contain_null_or_empty_values(List<string> collection, string fileName)
{
var blanks = collection.Where(string.IsNullOrEmpty).ToList();
if (blanks.Any())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Shouldly;
using TestStack.Dossier.DataSources.Generators;
using Xunit;
using Xunit.Extensions;

namespace TestStack.Dossier.Tests.DataSources.Generators
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Shouldly;
using TestStack.Dossier.DataSources.Generators;
using Xunit;
using Xunit.Extensions;

namespace TestStack.Dossier.Tests.DataSources.Generators
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using TestStack.Dossier.EquivalenceClasses.Geo;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand All @@ -22,11 +22,11 @@ protected override List<object[]> GetData()
{
return new List<object[]>
{
new object[] {new Words(FromDictionary.GeoContinent), GenerateTestCasesForSut(Any.Continent)},
new object[] {new Words(FromDictionary.GeoCountry), GenerateTestCasesForSut(Any.Country)},
new object[] {new Words(FromDictionary.GeoCountryCode), GenerateTestCasesForSut(Any.CountryCode)},
new object[] {new Words(FromDictionary.GeoLatitude), GenerateTestCasesForSut(Any.Latitude)},
new object[] {new Words(FromDictionary.GeoLongitude), GenerateTestCasesForSut(Any.Longitude)},
new object[] {new Words(FromDictionary.GeoContinent), GenerateTestCasesForSut(Any.Geography.Continent)},
new object[] {new Words(FromDictionary.GeoCountry), GenerateTestCasesForSut(Any.Geography.Country)},
new object[] {new Words(FromDictionary.GeoCountryCode), GenerateTestCasesForSut(Any.Geography.CountryCode)},
new object[] {new Words(FromDictionary.GeoLatitude), GenerateTestCasesForSut(Any.Geography.Latitude)},
new object[] {new Words(FromDictionary.GeoLongitude), GenerateTestCasesForSut(Any.Geography.Longitude)},
};
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using TestStack.Dossier.DataSources.Dictionaries;
using TestStack.Dossier.EquivalenceClasses.Person;
using Xunit;
using Xunit.Extensions;

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

PersonEquivalenceExtensions.InitializeUniqueEmailAddressSource();
generatedValues.Add(any2.UniqueEmailAddress());
generatedValues.Add(any2.Person.UniqueEmailAddress());
for (var i = 0; i < source.Data.Count - 1; i++)
{
generatedValues.Add(Any.UniqueEmailAddress());
generatedValues.Add(Any.Person.UniqueEmailAddress());
}

generatedValues.Distinct().Count()
Expand All @@ -44,17 +43,17 @@ protected override List<object[]> GetData()
return new List<object[]>
{
new object[]
{new Words(FromDictionary.PersonEmailAddress), GenerateTestCasesForSut(Any.EmailAddress)},
new object[] {new Words(FromDictionary.PersonLanguage), GenerateTestCasesForSut(Any.Language)},
{new Words(FromDictionary.PersonEmailAddress), GenerateTestCasesForSut(Any.Person.EmailAddress)},
new object[] {new Words(FromDictionary.PersonLanguage), GenerateTestCasesForSut(Any.Person.Language)},
new object[]
{new Words(FromDictionary.PersonNameFirstFemale), GenerateTestCasesForSut(Any.FemaleFirstName)},
new object[] {new Words(FromDictionary.PersonNameFirst), GenerateTestCasesForSut(Any.FirstName)},
new object[] {new Words(FromDictionary.PersonNameFull), GenerateTestCasesForSut(Any.FullName)},
new object[] {new Words(FromDictionary.PersonNameLast), GenerateTestCasesForSut(Any.LastName)},
{new Words(FromDictionary.PersonNameFirstFemale), GenerateTestCasesForSut(Any.Person.NameFirstFemale)},
new object[] {new Words(FromDictionary.PersonNameFirst), GenerateTestCasesForSut(Any.Person.NameFirst)},
new object[] {new Words(FromDictionary.PersonNameFull), GenerateTestCasesForSut(Any.Person.NameFull)},
new object[] {new Words(FromDictionary.PersonNameLast), GenerateTestCasesForSut(Any.Person.NameLast)},
new object[]
{new Words(FromDictionary.PersonNameFirstMale), GenerateTestCasesForSut(Any.MaleFirstName)},
new object[] {new Words(FromDictionary.PersonNameSuffix), GenerateTestCasesForSut(Any.Suffix)},
new object[] {new Words(FromDictionary.PersonNameTitle), GenerateTestCasesForSut(Any.Title)},
{new Words(FromDictionary.PersonNameFirstMale), GenerateTestCasesForSut(Any.Person.NameFirstMale)},
new object[] {new Words(FromDictionary.PersonNameSuffix), GenerateTestCasesForSut(Any.Person.NameSuffix)},
new object[] {new Words(FromDictionary.PersonNameTitle), GenerateTestCasesForSut(Any.Person.NameTitle)},
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit;
using Xunit.Extensions;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using TestStack.Dossier.DataSources;
using TestStack.Dossier.DataSources.Dictionaries;
using Xunit.Extensions;
using Xunit;

namespace TestStack.Dossier.Tests.EquivalenceClasses
{
Expand Down
36 changes: 0 additions & 36 deletions TestStack.Dossier.Tests/Properties/AssemblyInfo.cs

This file was deleted.

2 changes: 1 addition & 1 deletion TestStack.Dossier.Tests/ProxyBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace TestStack.Dossier.Tests
{
class ProxyBuilderTests
public class ProxyBuilderTests
{
[Fact]
public void GivenClassToProxyWithNoProperties_WhenBuildingProxy_ReturnAClassWithNoReturnsValuesSet()
Expand Down
Loading

0 comments on commit 6377f17

Please sign in to comment.