Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
115 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
specs/Qowaiv.Specs/Diagnostics/Contracts/Impure_attribute_specs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace Diagnostics.Contracts.Impure_attribute_specs; | ||
|
||
internal class Can_decorate_methods_with | ||
{ | ||
[Test] | ||
public void Collection_mutation_attribute() | ||
=> typeof(SomeClass).GetMethod(nameof(SomeClass.CollectionMutation)).Should().BeDecoratedWith<CollectionMutationAttribute>(); | ||
|
||
[Test] | ||
public void Impure_attribute() | ||
=> typeof(SomeClass).GetMethod(nameof(SomeClass.Impure)).Should().BeDecoratedWith<ImpureAttribute>(); | ||
|
||
[Test] | ||
public void Fluent_syntax_attribute() | ||
=> typeof(SomeClass).GetMethod(nameof(SomeClass.FluentSyntax)).Should().BeDecoratedWith<FluentSyntaxAttribute>(); | ||
} | ||
|
||
internal class SomeClass | ||
{ | ||
[CollectionMutation] | ||
public bool CollectionMutation(HashSet<SomeClass> set) => set.Add(this); | ||
|
||
[Impure] | ||
public static int Impure() => 42; | ||
|
||
[FluentSyntax] | ||
public SomeClass FluentSyntax() => this; | ||
} |
13 changes: 13 additions & 0 deletions
13
specs/Qowaiv.Specs/Diagnostics/Contracts/Inheritable_attribute_specs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace Diagnostics.Contracts.Inheritable_attribute_specs; | ||
|
||
internal class Can_decorate | ||
{ | ||
[Test] | ||
public void Classes() | ||
=> typeof(SomeClass).Should().BeDecoratedWith<InheritableAttribute>(); | ||
} | ||
|
||
[Inheritable("For test purposes")] | ||
internal class SomeClass | ||
{ | ||
} |
13 changes: 13 additions & 0 deletions
13
specs/Qowaiv.Specs/Diagnostics/Contracts/Mutable_attribute_specs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace Diagnostics.Contracts.Mutable_attribute_specs; | ||
|
||
internal class Can_decorate | ||
{ | ||
[Test] | ||
public void Classes() | ||
=> typeof(SomeClass).Should().BeDecoratedWith<MutableAttribute>(); | ||
} | ||
|
||
[Mutable("For test purposes")] | ||
internal class SomeClass | ||
{ | ||
} |
26 changes: 26 additions & 0 deletions
26
specs/Qowaiv.Specs/Diagnostics/Contracts/Will_be_sealed_attribute_specs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
namespace Diagnostics.Contracts.Will_be_sealed_attribute_specs; | ||
|
||
internal class Can_decorate | ||
{ | ||
[Test] | ||
public void Classes() | ||
=> typeof(SomeClass).Should().BeDecoratedWith<WillBeSealedAttribute>(); | ||
|
||
[Test] | ||
public void Properties() | ||
=> typeof(SomeClass).GetProperty(nameof(SomeClass.Property)).Should().BeDecoratedWith<WillBeSealedAttribute>(); | ||
|
||
[Test] | ||
public void Methods() | ||
=> typeof(SomeClass).GetMethod(nameof(SomeClass.Method)).Should().BeDecoratedWith<WillBeSealedAttribute>(); | ||
} | ||
|
||
[WillBeSealed("For test purposes")] | ||
internal class SomeClass | ||
{ | ||
[WillBeSealed("No reason to change this property.")] | ||
public virtual int Property { get; } = 42; | ||
|
||
[WillBeSealed("No reason to change this method.")] | ||
public virtual int Method() => 42; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
src/Qowaiv.Data.SqlClient/Internals/Diagnostics/Contracts/FluentSyntaxAttribute.cs
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/Qowaiv.Data.SqlClient/Internals/Diagnostics/Contracts/ImpureAttribute.cs
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/Qowaiv.Data.SqlClient/Internals/Diagnostics/Contracts/InheritableAttribute.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
src/Qowaiv.TestTools/Internals/Diagnostics/Contracts/FluentSyntaxAttribute.cs
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/Qowaiv.TestTools/Internals/Diagnostics/Contracts/ImpureAttribute.cs
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/Qowaiv.TestTools/Internals/Diagnostics/Contracts/InheritableAttribute.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...aiv/Internals/Diagnostics/DebugDisplay.cs → src/Qowaiv/Diagnostics/DebugDisplay.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
src/Qowaiv/Internals/Diagnostics/Contracts/CollectionMutationAttribute.cs
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/Qowaiv/Internals/Diagnostics/Contracts/FluentSyntaxAttribute.cs
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/Qowaiv/Internals/Diagnostics/Contracts/ImpureAttribute.cs
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/Qowaiv/Internals/Diagnostics/Contracts/InheritableAttribute.cs
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/Qowaiv/Internals/Diagnostics/Contracts/WillBeSealedAttribute.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters