Last active
June 8, 2016 12:15
-
-
Save dgg/f82b2798a501dd8be2e5809da930d556 to your computer and use it in GitHub Desktop.
a-case-of-composition-and-communication.simplest
This file contains hidden or 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
TimeZoneInfo subject = TimeZoneInfo.FindSystemTimeZoneById("Hawaiian Standard Time"); | |
Assert.That(subject, Must.Satisfy.Conjunction( | |
Must.Have.Property(nameof(TimeZoneInfo.DaylightName), Does.Contain("Nightlight")), | |
Must.Have.Property(nameof(TimeZoneInfo.DisplayName), Does.Contain("Lanzarote")))); |
This file contains hidden or 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
Expected: property DaylightName String containing "Nightlight" and property DisplayName containing "Lanzarote" | |
Specifically: property DaylightName String containing "Nightlight" | |
But was: <(UTC-10:00) Hawaii> | |
Specifically: "Hawaiian Daylight Time" |
This file contains hidden or 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
public class ComposablePropertyConstraint : PropertyConstraint | |
{ | |
public ComposablePropertyConstraint(string name, IConstraint baseConstraint) : | |
base(name, baseConstraint) { } | |
} |
This file contains hidden or 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
TimeZoneInfo subject = TimeZoneInfo.FindSystemTimeZoneById("Hawaiian Standard Time"); | |
Assert.That(subject, Has.Property(nameof(TimeZoneInfo.DaylightName)).Contain("Nightlight").And | |
.Property(nameof(TimeZoneInfo.DisplayName)).Contain("Lanzarote")); | |
Assert.That(subject, Has.Property(nameof(TimeZoneInfo.DaylightName)).Contain("Nightlight") & | |
Has.Property(nameof(TimeZoneInfo.DisplayName)).Contain("Lanzarote")); |
This file contains hidden or 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
Test 'Testing.Commons.NUnit.Tests.Constraints.CompositionTester.OperatorComposition' failed: | |
Expected: property DaylightName String containing "Nightlight" and property DisplayName containing "Lanzarote" | |
But was: "Hawaiian Daylight Time" |
This file contains hidden or 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
TimeZoneInfo subject = TimeZoneInfo.FindSystemTimeZoneById("Hawaiian Standard Time"); | |
Assert.That(subject, Must.Satisfy.Conjunction( | |
Has.Property(nameof(TimeZoneInfo.DaylightName)).Contain("Nightlight"), | |
Has.Property(nameof(TimeZoneInfo.DisplayName)).Contain("Lanzarote"))); |
This file contains hidden or 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
TimeZoneInfo subject = TimeZoneInfo.FindSystemTimeZoneById("Hawaiian Standard Time"); | |
Assert.That(subject, Has.Property(nameof(TimeZoneInfo.DaylightName)).Contain("Nightlight")); | |
Assert.That(subject, Has.Property(nameof(TimeZoneInfo.DisplayName)).Contain("Lanzarote")); |
This file contains hidden or 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
Test 'Testing.Commons.NUnit.Tests.Constraints.CompositionTester.Property' failed: | |
Expected: property DaylightName String containing "Nightlight" | |
But was: "Hawaiian Daylight Time" |
This file contains hidden or 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
TimeZoneInfo subject = TimeZoneInfo.FindSystemTimeZoneById("Hawaiian Standard Time"); | |
Assert.That(subject.DaylightName, Does.Contain("Nightlight")); | |
Assert.That(subject.DisplayName, Does.Contain("Lanzarote")); |
This file contains hidden or 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
Test 'Testing.Commons.NUnit.Tests.Constraints.CompositionTester.Simple' failed: | |
Expected: String containing "Nightlight" | |
But was: "Hawaiian Daylight Time" | |
Constraints\CompositionTester.cs(14,0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment