diff --git a/.gitignore b/.gitignore index 6ea0185..550e699 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,7 @@ _ReSharper.* packages *.DotSettings *.ncrunchproject -*.ncrunchsolution \ No newline at end of file +*.ncrunchsolution + +# Visual Studio 2015 cache/options directory +.vs/ \ No newline at end of file diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 0000000..3f0e003 --- /dev/null +++ b/NuGet.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/TestStack.Dossier.Tests/Assembly.cs b/TestStack.Dossier.Tests/Assembly.cs new file mode 100644 index 0000000..7db8497 --- /dev/null +++ b/TestStack.Dossier.Tests/Assembly.cs @@ -0,0 +1,3 @@ +using Xunit; + +[assembly: CollectionBehavior(DisableTestParallelization = true)] \ No newline at end of file diff --git a/TestStack.Dossier.Tests/Builder_CreateListTests.cs b/TestStack.Dossier.Tests/Builder_CreateListTests.cs index 62be8bc..dde56aa 100644 --- a/TestStack.Dossier.Tests/Builder_CreateListTests.cs +++ b/TestStack.Dossier.Tests/Builder_CreateListTests.cs @@ -170,6 +170,7 @@ public void WhenBuildingObjectsImplicitly_ThenTheAnonymousValueFixtureIsSharedAc studentViewModels.Select(x => x.Grade).ShouldBeUnique(); } + [Fact] public void WhenBuildingObjectsWithCtorAndPrivateSetters_ThenSetPrivateSettersByDefault() { var dto = Builder.CreateListOfSize(1) diff --git a/TestStack.Dossier.Tests/DataSources/DataSourceConventionTests.cs b/TestStack.Dossier.Tests/DataSources/DataSourceConventionTests.cs index 7fa4538..8087e27 100644 --- a/TestStack.Dossier.Tests/DataSources/DataSourceConventionTests.cs +++ b/TestStack.Dossier.Tests/DataSources/DataSourceConventionTests.cs @@ -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 sut, int expectedCount) { var collection = sut.Data.ToList(); diff --git a/TestStack.Dossier.Tests/DataSources/Dictionaries/Resources/FileDataConventions.cs b/TestStack.Dossier.Tests/DataSources/Dictionaries/Resources/FileDataConventions.cs index afd5b62..4cfd92c 100644 --- a/TestStack.Dossier.Tests/DataSources/Dictionaries/Resources/FileDataConventions.cs +++ b/TestStack.Dossier.Tests/DataSources/Dictionaries/Resources/FileDataConventions.cs @@ -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")) @@ -27,7 +27,7 @@ public void ApplyConventions() } } - public void Should_not_contain_duplicates(List collection, string fileName) + private void Should_not_contain_duplicates(List collection, string fileName) { var duplicates = collection .GroupBy(x => x) @@ -43,7 +43,7 @@ public void Should_not_contain_duplicates(List collection, string fileNa } } - public void Should_not_contain_null_or_empty_values(List collection, string fileName) + private void Should_not_contain_null_or_empty_values(List collection, string fileName) { var blanks = collection.Where(string.IsNullOrEmpty).ToList(); if (blanks.Any()) diff --git a/TestStack.Dossier.Tests/DataSources/Generators/RandomGeneratorTests.cs b/TestStack.Dossier.Tests/DataSources/Generators/RandomGeneratorTests.cs index 3670841..9c94484 100644 --- a/TestStack.Dossier.Tests/DataSources/Generators/RandomGeneratorTests.cs +++ b/TestStack.Dossier.Tests/DataSources/Generators/RandomGeneratorTests.cs @@ -3,7 +3,6 @@ using Shouldly; using TestStack.Dossier.DataSources.Generators; using Xunit; -using Xunit.Extensions; namespace TestStack.Dossier.Tests.DataSources.Generators { diff --git a/TestStack.Dossier.Tests/DataSources/Generators/SequentiaGeneratorTests.cs b/TestStack.Dossier.Tests/DataSources/Generators/SequentiaGeneratorTests.cs index a3f22ae..113cbb9 100644 --- a/TestStack.Dossier.Tests/DataSources/Generators/SequentiaGeneratorTests.cs +++ b/TestStack.Dossier.Tests/DataSources/Generators/SequentiaGeneratorTests.cs @@ -2,7 +2,6 @@ using Shouldly; using TestStack.Dossier.DataSources.Generators; using Xunit; -using Xunit.Extensions; namespace TestStack.Dossier.Tests.DataSources.Generators { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/AddressAusEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/AddressAusEquivalenceTests.cs index 692e899..03efd7d 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/AddressAusEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/AddressAusEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/AddressUkEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/AddressUkEquivalenceTests.cs index 18f051b..578daea 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/AddressUkEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/AddressUkEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/AddressUsEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/AddressUsEquivalenceTests.cs index 183ec9a..2f13ccd 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/AddressUsEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/AddressUsEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/ColourEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/ColourEquivalenceTests.cs index 94749ae..ca48af8 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/ColourEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/ColourEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/CompanyEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/CompanyEquivalenceTests.cs index 4c9aed2..60a4530 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/CompanyEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/CompanyEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/FinanceEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/FinanceEquivalenceTests.cs index a4ecc00..35aa1fa 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/FinanceEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/FinanceEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/FrequencyEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/FrequencyEquivalenceTests.cs index d817874..ab7e107 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/FrequencyEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/FrequencyEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/GeoEquivalenceClassesTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/GeoEquivalenceClassesTests.cs index d48a7d1..40a5181 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/GeoEquivalenceClassesTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/GeoEquivalenceClassesTests.cs @@ -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 { @@ -22,11 +22,11 @@ protected override List GetData() { return new List { - 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)}, }; } } diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/GeoEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/GeoEquivalenceTests.cs index b68a9e0..69e5803 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/GeoEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/GeoEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/IdentifierEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/IdentifierEquivalenceTests.cs index ad9ab21..45950ba 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/IdentifierEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/IdentifierEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/IntegerEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/IntegerEquivalenceTests.cs index af0db97..9df140e 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/IntegerEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/IntegerEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/LoremIpsumEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/LoremIpsumEquivalenceTests.cs index 0e97f89..b652093 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/LoremIpsumEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/LoremIpsumEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/PersonEquivalenceClassesTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/PersonEquivalenceClassesTests.cs index 58edd33..7f13c4a 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/PersonEquivalenceClassesTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/PersonEquivalenceClassesTests.cs @@ -5,7 +5,6 @@ using TestStack.Dossier.DataSources.Dictionaries; using TestStack.Dossier.EquivalenceClasses.Person; using Xunit; -using Xunit.Extensions; namespace TestStack.Dossier.Tests.EquivalenceClasses { @@ -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() @@ -44,17 +43,17 @@ protected override List GetData() return new List { 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)}, }; } } diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/PersonEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/PersonEquivalenceTests.cs index bf540f4..f057e2d 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/PersonEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/PersonEquivalenceTests.cs @@ -4,7 +4,6 @@ using TestStack.Dossier.DataSources; using TestStack.Dossier.DataSources.Dictionaries; using Xunit; -using Xunit.Extensions; namespace TestStack.Dossier.Tests.EquivalenceClasses { diff --git a/TestStack.Dossier.Tests/EquivalenceClasses/ShirtSizeEquivalenceTests.cs b/TestStack.Dossier.Tests/EquivalenceClasses/ShirtSizeEquivalenceTests.cs index d5b8bf9..2795f7c 100644 --- a/TestStack.Dossier.Tests/EquivalenceClasses/ShirtSizeEquivalenceTests.cs +++ b/TestStack.Dossier.Tests/EquivalenceClasses/ShirtSizeEquivalenceTests.cs @@ -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 { diff --git a/TestStack.Dossier.Tests/Properties/AssemblyInfo.cs b/TestStack.Dossier.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index e5d5cf8..0000000 --- a/TestStack.Dossier.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("TestStack.Dossier.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("TestStack.Dossier.Tests")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("295d98e2-8a24-4bbb-9455-08f915d782b7")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/TestStack.Dossier.Tests/ProxyBuilderTests.cs b/TestStack.Dossier.Tests/ProxyBuilderTests.cs index c6c662b..62cbc2a 100644 --- a/TestStack.Dossier.Tests/ProxyBuilderTests.cs +++ b/TestStack.Dossier.Tests/ProxyBuilderTests.cs @@ -7,7 +7,7 @@ namespace TestStack.Dossier.Tests { - class ProxyBuilderTests + public class ProxyBuilderTests { [Fact] public void GivenClassToProxyWithNoProperties_WhenBuildingProxy_ReturnAClassWithNoReturnsValuesSet() diff --git a/TestStack.Dossier.Tests/PublicApiApproval/PublicApiApproverTests.GivenDossierAssembly_WhenPublicApiChecked_ShouldHaveNoChanges.approved.txt b/TestStack.Dossier.Tests/PublicApiApproval/PublicApiApproverTests.GivenDossierAssembly_WhenPublicApiChecked_ShouldHaveNoChanges.approved.txt index c1b8966..ad5a50a 100644 --- a/TestStack.Dossier.Tests/PublicApiApproval/PublicApiApproverTests.GivenDossierAssembly_WhenPublicApiChecked_ShouldHaveNoChanges.approved.txt +++ b/TestStack.Dossier.Tests/PublicApiApproval/PublicApiApproverTests.GivenDossierAssembly_WhenPublicApiChecked_ShouldHaveNoChanges.approved.txt @@ -1,12 +1,5 @@ -[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("DynamicProxyGenAssembly2")] -[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("TestStack.Dossier.Tests")] -[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] -[assembly: System.Runtime.InteropServices.GuidAttribute("24a139fb-b390-4f14-9be6-cf9fb354bb5d")] -[assembly: System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName=".NET Framework 4")] - namespace TestStack.Dossier { - public class AddressAusEquivalence { public AddressAusEquivalence(TestStack.Dossier.AnonymousValueFixture fixture) { } @@ -55,14 +48,14 @@ namespace TestStack.Dossier public TestStack.Dossier.CompanyEquivalence Company { get; } public static System.Collections.Generic.IEnumerable DefaultValueSuppliers { get; } public TestStack.Dossier.FinanceEquivalence Finance { get; } - public Ploeh.AutoFixture.Fixture Fixture { get; } + public AutoFixture.Fixture Fixture { get; } public TestStack.Dossier.GeoEquivalence Geography { get; } public static System.Collections.Generic.ICollection GlobalValueSuppliers { get; } public TestStack.Dossier.IdentifierEquivalence Identifier { get; } public TestStack.Dossier.InternetEquivalence Internet { get; } public System.Collections.Generic.ICollection LocalValueSuppliers { get; } public TestStack.Dossier.PersonEquivalence Person { get; } - public Ploeh.AutoFixture.RegularExpressionGenerator RegexGenerator { get; } + public AutoFixture.RegularExpressionGenerator RegexGenerator { get; } public T Get(System.Linq.Expressions.Expression> property) { } public object Get(System.Type type, string propertyName) { } public TestStack.Dossier.DataSources.Dictionaries.Words Words(string dictionaryName) { } @@ -200,15 +193,15 @@ namespace TestStack.Dossier protected bool Has(System.Linq.Expressions.Expression> property) { } protected bool Has(string propertyName) { } public virtual bool IsListBuilderProxy() { } + public static TObject op_Implicit(TestStack.Dossier.TestDataBuilder builder) { } + public static System.Collections.Generic.List op_Implicit(TestStack.Dossier.TestDataBuilder builder) { } public virtual TBuilder Set(System.Linq.Expressions.Expression> property, TValue value) { } public virtual TBuilder Set(System.Linq.Expressions.Expression> property, System.Func factory) { } } } namespace TestStack.Dossier.DataSources { - public abstract class DataSource : TestStack.Dossier.DataSources.IDataSource - { protected DataSource(TestStack.Dossier.DataSources.Generators.IGenerator generator) { } protected DataSource() { } @@ -218,7 +211,6 @@ namespace TestStack.Dossier.DataSources public virtual T Next() { } } public interface IDataSource - { System.Collections.Generic.IList Data { get; } TestStack.Dossier.DataSources.Generators.IGenerator Generator { get; } @@ -227,7 +219,6 @@ namespace TestStack.Dossier.DataSources } namespace TestStack.Dossier.DataSources.Dictionaries { - [System.ObsoleteAttribute("FileDictionarySource is deprecated, please use Words(FromDictionary) instead.")] public abstract class FileDictionarySource : TestStack.Dossier.DataSources.DataSource { @@ -310,7 +301,6 @@ namespace TestStack.Dossier.DataSources.Dictionaries } namespace TestStack.Dossier.DataSources.Generators { - public interface IGenerator { int ListSize { get; set; } @@ -337,7 +327,6 @@ namespace TestStack.Dossier.DataSources.Generators } namespace TestStack.Dossier.DataSources.Geography { - [System.ObsoleteAttribute("GeoContinentSource is deprecated, please use Words(FromDictionary.GeoContinent) i" + "nstead.")] public class GeoContinentSource : TestStack.Dossier.DataSources.Dictionaries.FileDictionarySource @@ -371,7 +360,6 @@ namespace TestStack.Dossier.DataSources.Geography } namespace TestStack.Dossier.DataSources.Person { - [System.ObsoleteAttribute("PersonEmailAddressSource is deprecated, please use Words(FromDictionary.PersonEma" + "ilAddress) instead.")] public class PersonEmailAddressSource : TestStack.Dossier.DataSources.Dictionaries.FileDictionarySource @@ -430,7 +418,6 @@ namespace TestStack.Dossier.DataSources.Person } namespace TestStack.Dossier.DataSources.Picking { - public class Pick { public Pick() { } @@ -438,13 +425,11 @@ namespace TestStack.Dossier.DataSources.Picking public static TestStack.Dossier.DataSources.Picking.RepeatingSequenceSource RepeatingSequenceFrom(System.Collections.Generic.IList list) { } } public class RandomItemSource : TestStack.Dossier.DataSources.DataSource - { public RandomItemSource(System.Collections.Generic.IList list) { } protected override System.Collections.Generic.IList InitializeDataSource() { } } public class RepeatingSequenceSource : TestStack.Dossier.DataSources.DataSource - { public RepeatingSequenceSource(System.Collections.Generic.IList list) { } protected override System.Collections.Generic.IList InitializeDataSource() { } @@ -452,7 +437,6 @@ namespace TestStack.Dossier.DataSources.Picking } namespace TestStack.Dossier.EquivalenceClasses { - public class static EnumEquivalenceClasses { public static TEnum Except(this TestStack.Dossier.AnonymousValueFixture fixture, params TEnum[] except) @@ -477,7 +461,6 @@ namespace TestStack.Dossier.EquivalenceClasses } namespace TestStack.Dossier.EquivalenceClasses.Geo { - public class static GeographyEquivalenceClassescs { [System.ObsoleteAttribute("Continent is deprecated, please use Geography.Continent instead.")] @@ -494,7 +477,6 @@ namespace TestStack.Dossier.EquivalenceClasses.Geo } namespace TestStack.Dossier.EquivalenceClasses.Person { - public class static PersonEquivalenceClasses { [System.ObsoleteAttribute("EmailAddress is deprecated, please use Person.EmailAddress instead.")] @@ -521,7 +503,6 @@ namespace TestStack.Dossier.EquivalenceClasses.Person } namespace TestStack.Dossier.Factories { - public class AllPropertiesFactory : TestStack.Dossier.Factories.CallConstructorFactory { public AllPropertiesFactory() { } @@ -559,7 +540,6 @@ namespace TestStack.Dossier.Factories } namespace TestStack.Dossier.Lists { - public class ListBuilder where TObject : class where TBuilder : TestStack.Dossier.TestDataBuilder<, >, new () @@ -567,6 +547,7 @@ namespace TestStack.Dossier.Lists public TBuilder All() { } public System.Collections.Generic.IList BuildList() { } public System.Collections.Generic.IEnumerable GetBuilders() { } + public static System.Collections.Generic.List op_Implicit(TestStack.Dossier.Lists.ListBuilder builder) { } public TBuilder TheFirst(int howMany) { } public TBuilder TheLast(int howMany) { } public TBuilder TheNext(int howMany) { } @@ -600,7 +581,6 @@ namespace TestStack.Dossier.Lists } namespace TestStack.Dossier.Suppliers { - public class DefaultEmailValueSupplier : TestStack.Dossier.IAnonymousValueSupplier { public DefaultEmailValueSupplier() { } diff --git a/TestStack.Dossier.Tests/PublicApiApproval/PublicApiApproverTests.cs b/TestStack.Dossier.Tests/PublicApiApproval/PublicApiApproverTests.cs index bfc026b..fd38952 100644 --- a/TestStack.Dossier.Tests/PublicApiApproval/PublicApiApproverTests.cs +++ b/TestStack.Dossier.Tests/PublicApiApproval/PublicApiApproverTests.cs @@ -9,8 +9,8 @@ public class PublicApiApproverTests public void GivenDossierAssembly_WhenPublicApiChecked_ShouldHaveNoChanges() { ShouldlyConfiguration.DiffTools.KnownDoNotLaunchStrategies.TeamCity.ShouldNotLaunch(); - var dossierAssembly = typeof (AnonymousValueFixture).Assembly; - var publicApi = PublicApiGenerator.PublicApiGenerator.GetPublicApi(dossierAssembly); + var dossierAssembly = typeof(AnonymousValueFixture).Assembly; + var publicApi = PublicApiGenerator.ApiGenerator.GeneratePublicApi(dossierAssembly, shouldIncludeAssemblyAttributes: false); publicApi.ShouldMatchApproved(); } } diff --git a/TestStack.Dossier.Tests/TestStack.Dossier.Tests.csproj b/TestStack.Dossier.Tests/TestStack.Dossier.Tests.csproj index dec25d4..a1a527f 100644 --- a/TestStack.Dossier.Tests/TestStack.Dossier.Tests.csproj +++ b/TestStack.Dossier.Tests/TestStack.Dossier.Tests.csproj @@ -1,153 +1,36 @@ - - - + + - Debug - AnyCPU - {DC49CE57-CB3F-487D-83DC-6A4E78CB908C} - Library - Properties - TestStack.Dossier.Tests - TestStack.Dossier.Tests - v4.5.1 - 512 - ..\ - - 660882d1 + netcoreapp2.0;net472 - - true + + full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - 5 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false + true + - - False - ..\packages\NSubstitute.1.8.1.0\lib\net45\NSubstitute.dll - - - ..\packages\PublicApiGenerator.4.0.1\lib\net40\PublicApiGenerator.dll - True - - - ..\packages\Shouldly.2.7.0-beta0003\lib\net40\Shouldly.dll - True - - - - - - - ..\packages\xunit.1.9.2\lib\net20\xunit.dll - - - ..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll - + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - + + - + PreserveNewest - - - - - - - - {01e4ee61-ab1a-4177-8b6c-d50205d167a9} - TestStack.Dossier - + - - - + \ No newline at end of file diff --git a/TestStack.Dossier.Tests/packages.config b/TestStack.Dossier.Tests/packages.config deleted file mode 100644 index 30cb97f..0000000 --- a/TestStack.Dossier.Tests/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/TestStack.Dossier.sln b/TestStack.Dossier.sln index 78b68bf..ea72a89 100644 --- a/TestStack.Dossier.sln +++ b/TestStack.Dossier.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26014.0 +VisualStudioVersion = 15.0.26430.13 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BC8508D1-6FCB-46B2-9C14-F41F6AD76B09}" ProjectSection(SolutionItems) = preProject @@ -14,9 +14,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestStack.Dossier.Tests", "TestStack.Dossier.Tests\TestStack.Dossier.Tests.csproj", "{DC49CE57-CB3F-487D-83DC-6A4E78CB908C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestStack.Dossier", "TestStack.Dossier\TestStack.Dossier.csproj", "{768AF10B-5E0C-46BB-B6CD-B202AF39A0EF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestStack.Dossier", "TestStack.Dossier\TestStack.Dossier.csproj", "{01E4EE61-AB1A-4177-8B6C-D50205D167A9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestStack.Dossier.Tests", "TestStack.Dossier.Tests\TestStack.Dossier.Tests.csproj", "{5B38B893-1018-4F0D-9999-4DA1385EB94A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -24,14 +24,14 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DC49CE57-CB3F-487D-83DC-6A4E78CB908C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DC49CE57-CB3F-487D-83DC-6A4E78CB908C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DC49CE57-CB3F-487D-83DC-6A4E78CB908C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DC49CE57-CB3F-487D-83DC-6A4E78CB908C}.Release|Any CPU.Build.0 = Release|Any CPU - {01E4EE61-AB1A-4177-8B6C-D50205D167A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {01E4EE61-AB1A-4177-8B6C-D50205D167A9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {01E4EE61-AB1A-4177-8B6C-D50205D167A9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {01E4EE61-AB1A-4177-8B6C-D50205D167A9}.Release|Any CPU.Build.0 = Release|Any CPU + {768AF10B-5E0C-46BB-B6CD-B202AF39A0EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {768AF10B-5E0C-46BB-B6CD-B202AF39A0EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {768AF10B-5E0C-46BB-B6CD-B202AF39A0EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {768AF10B-5E0C-46BB-B6CD-B202AF39A0EF}.Release|Any CPU.Build.0 = Release|Any CPU + {5B38B893-1018-4F0D-9999-4DA1385EB94A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B38B893-1018-4F0D-9999-4DA1385EB94A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B38B893-1018-4F0D-9999-4DA1385EB94A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B38B893-1018-4F0D-9999-4DA1385EB94A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/TestStack.Dossier/AnonymousValueFixture.cs b/TestStack.Dossier/AnonymousValueFixture.cs index 83a6dc2..0e641ae 100644 --- a/TestStack.Dossier/AnonymousValueFixture.cs +++ b/TestStack.Dossier/AnonymousValueFixture.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; -using Ploeh.AutoFixture; +using AutoFixture; using TestStack.Dossier.DataSources.Dictionaries; using TestStack.Dossier.Suppliers; diff --git a/TestStack.Dossier/AssemblyInfo.cs b/TestStack.Dossier/AssemblyInfo.cs new file mode 100644 index 0000000..66feadf --- /dev/null +++ b/TestStack.Dossier/AssemblyInfo.cs @@ -0,0 +1,6 @@ +using System.Runtime.CompilerServices; + +// Handling InternalsVisibleTo in new .csproj +// https://stackoverflow.com/questions/42810705/visual-studio-2017-new-csproj-internalsvisibleto +[assembly: InternalsVisibleTo("TestStack.Dossier.Tests")] +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] \ No newline at end of file diff --git a/TestStack.Dossier/DataSources/Dictionaries/CachedFileDictionaryRepository.cs b/TestStack.Dossier/DataSources/Dictionaries/CachedFileDictionaryRepository.cs index 0a783d1..2bf84bd 100644 --- a/TestStack.Dossier/DataSources/Dictionaries/CachedFileDictionaryRepository.cs +++ b/TestStack.Dossier/DataSources/Dictionaries/CachedFileDictionaryRepository.cs @@ -22,7 +22,7 @@ public IList GetWordsFrom(string dictionary) else { var resourceName = string.Format("TestStack.Dossier.DataSources.Dictionaries.Resources.{0}", name); - words = GetWordsFromEmbeddedResource(GetType().Assembly, resourceName).ToList(); + words = GetWordsFromEmbeddedResource(GetType().GetTypeInfo().Assembly, resourceName).ToList(); } return words; diff --git a/TestStack.Dossier/EquivalenceClasses/EnumEquivalenceClasses.cs b/TestStack.Dossier/EquivalenceClasses/EnumEquivalenceClasses.cs index a37f287..c5c5b47 100644 --- a/TestStack.Dossier/EquivalenceClasses/EnumEquivalenceClasses.cs +++ b/TestStack.Dossier/EquivalenceClasses/EnumEquivalenceClasses.cs @@ -1,6 +1,6 @@ using System; using System.Linq; -using Ploeh.AutoFixture; +using AutoFixture; namespace TestStack.Dossier.EquivalenceClasses { diff --git a/TestStack.Dossier/EquivalenceClasses/FinanceEquivalence.cs b/TestStack.Dossier/EquivalenceClasses/FinanceEquivalence.cs index e3f2364..c98e8a0 100644 --- a/TestStack.Dossier/EquivalenceClasses/FinanceEquivalence.cs +++ b/TestStack.Dossier/EquivalenceClasses/FinanceEquivalence.cs @@ -22,7 +22,6 @@ public FinanceEquivalence(AnonymousValueFixture fixture) /// /// Generate and return a finance credit card number. /// - /// The fixture to generate a value for. /// The generated value. public string CreditCardNumber() { @@ -32,7 +31,6 @@ public string CreditCardNumber() /// /// Generate and return a finance credit card type. /// - /// The fixture to generate a value for. /// The generated value. public string CreditCardType() { @@ -42,7 +40,6 @@ public string CreditCardType() /// /// Generate and return a finance currency name. /// - /// The fixture to generate a value for. /// The generated value. public string Currency() { @@ -52,7 +49,6 @@ public string Currency() /// /// Generate and return a finance currency code. /// - /// The fixture to generate a value for. /// The generated value. public string CurrencyCode() { diff --git a/TestStack.Dossier/EquivalenceClasses/IntegerEquivalenceClasses.cs b/TestStack.Dossier/EquivalenceClasses/IntegerEquivalenceClasses.cs index 9c60524..32c9acf 100644 --- a/TestStack.Dossier/EquivalenceClasses/IntegerEquivalenceClasses.cs +++ b/TestStack.Dossier/EquivalenceClasses/IntegerEquivalenceClasses.cs @@ -1,5 +1,5 @@ using System.Linq; -using Ploeh.AutoFixture; +using AutoFixture; namespace TestStack.Dossier.EquivalenceClasses { diff --git a/TestStack.Dossier/EquivalenceClasses/StringEquivalenceClasses.cs b/TestStack.Dossier/EquivalenceClasses/StringEquivalenceClasses.cs index f694f9e..4ad3ae9 100644 --- a/TestStack.Dossier/EquivalenceClasses/StringEquivalenceClasses.cs +++ b/TestStack.Dossier/EquivalenceClasses/StringEquivalenceClasses.cs @@ -1,6 +1,6 @@ using System.Text; -using Ploeh.AutoFixture; -using Ploeh.AutoFixture.Kernel; +using AutoFixture; +using AutoFixture.Kernel; namespace TestStack.Dossier.EquivalenceClasses { @@ -48,7 +48,8 @@ public object Resolve(object request) /// The generated string public static string StringStartingWith(this AnonymousValueFixture fixture, string prefix) { - return fixture.Fixture.Create(prefix); + //return fixture.Fixture.Create(prefix); + return string.Format("{0}{1}", prefix, fixture.Fixture.Create()); } /// diff --git a/TestStack.Dossier/Factories/AllPropertiesFactory.cs b/TestStack.Dossier/Factories/AllPropertiesFactory.cs index 1f105b3..1696811 100644 --- a/TestStack.Dossier/Factories/AllPropertiesFactory.cs +++ b/TestStack.Dossier/Factories/AllPropertiesFactory.cs @@ -1,4 +1,4 @@ -using Ploeh.AutoFixture; +using AutoFixture; namespace TestStack.Dossier.Factories { diff --git a/TestStack.Dossier/Factories/AutoFixtureFactory.cs b/TestStack.Dossier/Factories/AutoFixtureFactory.cs index 8c8b4ec..588817d 100644 --- a/TestStack.Dossier/Factories/AutoFixtureFactory.cs +++ b/TestStack.Dossier/Factories/AutoFixtureFactory.cs @@ -1,4 +1,4 @@ -using Ploeh.AutoFixture; +using AutoFixture; namespace TestStack.Dossier.Factories { diff --git a/TestStack.Dossier/Properties/AssemblyInfo.cs b/TestStack.Dossier/Properties/AssemblyInfo.cs deleted file mode 100644 index 35a1828..0000000 --- a/TestStack.Dossier/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("TestStack.Dossier")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("TestStack.Dossier")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: InternalsVisibleTo("TestStack.Dossier.Tests")] -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("24a139fb-b390-4f14-9be6-cf9fb354bb5d")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/TestStack.Dossier/Suppliers/DefaultValueSupplier.cs b/TestStack.Dossier/Suppliers/DefaultValueSupplier.cs index fe3f0d9..bfbea1c 100644 --- a/TestStack.Dossier/Suppliers/DefaultValueSupplier.cs +++ b/TestStack.Dossier/Suppliers/DefaultValueSupplier.cs @@ -1,4 +1,5 @@ using System; +using System.Reflection; namespace TestStack.Dossier.Suppliers { @@ -17,7 +18,7 @@ public bool CanSupplyValue(Type type, string propertyName) public object GenerateAnonymousValue(AnonymousValueFixture any, Type type, string propertyName) { // See stackoverflow: http://stackoverflow.com/questions/325426/programmatic-equivalent-of-defaulttype - if (type.IsValueType) + if (type.GetTypeInfo().IsValueType) { return Activator.CreateInstance(type); } diff --git a/TestStack.Dossier/Suppliers/DefaultValueTypeValueSupplier.cs b/TestStack.Dossier/Suppliers/DefaultValueTypeValueSupplier.cs index 1e0ec24..ae7ba85 100644 --- a/TestStack.Dossier/Suppliers/DefaultValueTypeValueSupplier.cs +++ b/TestStack.Dossier/Suppliers/DefaultValueTypeValueSupplier.cs @@ -1,7 +1,8 @@ using System; using System.Linq; -using Ploeh.AutoFixture; -using Ploeh.AutoFixture.Kernel; +using System.Reflection; +using AutoFixture; +using AutoFixture.Kernel; namespace TestStack.Dossier.Suppliers { @@ -13,7 +14,7 @@ public class DefaultValueTypeValueSupplier : IAnonymousValueSupplier /// public bool CanSupplyValue(Type type, string propertyName) { - return type.IsValueType; + return type.GetTypeInfo().IsValueType; } /// diff --git a/TestStack.Dossier/TestStack.Dossier.csproj b/TestStack.Dossier/TestStack.Dossier.csproj index 6643fca..5fc48a2 100644 --- a/TestStack.Dossier/TestStack.Dossier.csproj +++ b/TestStack.Dossier/TestStack.Dossier.csproj @@ -1,141 +1,97 @@ - - - + + - Debug - AnyCPU - {01E4EE61-AB1A-4177-8B6C-D50205D167A9} - Library - Properties - TestStack.Dossier + netstandard2.0 TestStack.Dossier - v4.0 - 512 - ..\ + TestStack.Dossier + Robert Moore, Michael Whelan, TestStack + + TestStack.Dossier provides you with the code infrastructure to easily and quickly generate test fixture data for your automated tests in a terse, readable and maintainable way using the Test Data Builder, anonymous value and equivalence class patterns. Formerly called NTestDataBuilder. + + false + testing data-generation test-fixture nbuilder nsubstitute autofixture mocking equivalence-class test-data-builder anonymous-value ntestdatabuilder + https://github.com/TestStack/TestStack.Dossier - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\TestStack.Dossier.xml - 5 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\TestStack.Dossier.xml + + + bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml + true + + + + + + + + - - ..\packages\Castle.Core.3.3.1\lib\net40-client\Castle.Core.dll - - - False - ..\packages\NSubstitute.1.8.1.0\lib\net40\NSubstitute.dll - - - ..\packages\AutoFixture.3.20.0\lib\net40\Ploeh.AutoFixture.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -172,6 +128,8 @@ + + @@ -200,14 +158,17 @@ - - - - + + + + + + + + + + 4.0.0-alpha.230 + + + \ No newline at end of file diff --git a/TestStack.Dossier/TestStack.Dossier.nuspec b/TestStack.Dossier/TestStack.Dossier.nuspec deleted file mode 100644 index b45f643..0000000 --- a/TestStack.Dossier/TestStack.Dossier.nuspec +++ /dev/null @@ -1,45 +0,0 @@ - - - - - TestStack.Dossier - - - 1.0.0 - - - Robert Moore, Michael Whelan, TestStack - - - TestStack.Dossier provides you with the code infrastructure to easily and quickly generate test fixture data for your automated tests in a terse, readable and maintainable way using the Test Data Builder, anonymous value and equivalence class patterns. - - Formerly called NTestDataBuilder. - - - https://github.com/TestStack/TestStack.Dossier - - - https://github.com/TestStack/TestStack.Dossier/blob/master/LICENSE - - - https://raw.github.com/TestStack/TestStack.Dossier/master/logo.png - - - testing data-generation test-fixture nbuilder nsubstitute autofixture mocking equivalence-class test-data-builder anonymous-value ntestdatabuilder - - - en-US - - - - - - - - - - - - - - diff --git a/TestStack.Dossier/packages.config b/TestStack.Dossier/packages.config deleted file mode 100644 index d6889a8..0000000 --- a/TestStack.Dossier/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 54dbffc..5a5ab94 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,28 +8,20 @@ environment: secure: cBxvAtTgSlWVblTXtx8QKygh2HQeYZ9i0plMjJzCTNInGCm1XyG+nrSs18qUtC8W before_build: - ps: >- - nuget restore + dotnet restore - choco install -y --no-progress git.install GitReleaseManager.Portable + dotnet tool install -g GitVersion.Tool --version 4.0.1-beta1-58 - npm install github-release-notes -g - - GitVersion /output buildserver /updateassemblyinfo - - If (Test-Path ".\PreBuild.ps1") { - - & ".\PreBuild.ps1" + dotnet gitversion /output buildserver - } - -build: - parallel: true - verbosity: minimal + npm install github-release-notes -g +build_script: +- ps: dotnet build --source "**/*.csproj" --configuration Release --verbosity minimal -p:VersionPrefix="$Env:GitVersion_NuGetVersion" -p:FileVersion="$Env:GitVersion_AssemblySemFileVer" -p:InformationalVersion="$Env:GitVersion_InformationalVersion" after_build: - ps: >- - Get-ChildItem -Recurse *.nuspec | foreach { nuget pack $_.FullName -Properties "Configuration=Release;Platform=AnyCPU" -Symbols -Version $Env:GitVersion_NuGetVersion } + dotnet pack $Env:APPVEYOR_PROJECT_NAME/$Env:APPVEYOR_PROJECT_NAME.csproj --configuration Release /p:PackageVersion="$Env:GitVersion_NuGetVersion" --no-build --output "$Env:APPVEYOR_BUILD_FOLDER" --include-symbols - $currentTag = git tag -l --points-at HEAD + $currentCommitIsTagged = git tag -l --points-at HEAD $HTTP_Request = [System.Net.WebRequest]::Create("https://api.github.com/repos/$env:GitHubOrganisation/$env:APPVEYOR_PROJECT_NAME/releases/tags/$Env:GitVersion_NuGetVersion") @@ -42,8 +34,9 @@ after_build: } catch [Net.WebException] { [System.Net.HttpWebResponse] $resp = [System.Net.HttpWebResponse] $_.Exception.Response + $noExistingGitHubRelease = $resp.StatusCode -eq 404 - if ($currentTag -And $resp.StatusCode -eq 404) { + if ($currentCommitIsTagged -And $noExistingGitHubRelease) { $env:SHOULD_DEPLOY = 'true'