-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
51 changed files
with
942 additions
and
342 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
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
34 changes: 34 additions & 0 deletions
34
....Cronus.Tests/Projections/When_adding_a_building_version_to_non_versionable_projection.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,34 @@ | ||
using Elders.Cronus.Projections.Versioning; | ||
using Elders.Cronus.Tests.Projections; | ||
using Machine.Specifications; | ||
|
||
namespace Elders.Cronus.Projections | ||
{ | ||
[Subject("ProjectionVersions")] | ||
public class When_adding_a_building_version_to_non_versionable_projection | ||
{ | ||
Establish context = () => | ||
{ | ||
MessageInfo.GetContractId(typeof(NonVersionableProjection)); | ||
version = new ProjectionVersion("NonVersionableProjection", ProjectionStatus.Live, 1, "hash"); | ||
versions = new ProjectionVersions(version); | ||
var rebuildVersion = versions.GetNext(new MarkupInterfaceProjectionVersioningPolicy()); | ||
versions.Add(rebuildVersion); | ||
nextVersion = new ProjectionVersion("NonVersionableProjection", ProjectionStatus.Live, 1, "hash"); | ||
}; | ||
|
||
Because of = () => versions.Add(nextVersion); | ||
|
||
It should_not_have_live_version = () => versions.GetLive().ShouldEqual(version); | ||
|
||
It should_not_be__canceled__ = () => versions.IsCanceled(version).ShouldBeFalse(); | ||
It should_not_be__outdated__ = () => versions.IsOutdatad(version).ShouldBeFalse(); | ||
|
||
static ProjectionVersion version; | ||
static ProjectionVersion nextVersion; | ||
static ProjectionVersions versions; | ||
} | ||
} |
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
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
30 changes: 30 additions & 0 deletions
30
...ders.Cronus.Tests/Projections/When_getting_next_version_for_non_versionable_projection.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,30 @@ | ||
using Elders.Cronus.Projections.Versioning; | ||
using Elders.Cronus.Tests.Projections; | ||
using Machine.Specifications; | ||
|
||
namespace Elders.Cronus.Projections | ||
{ | ||
[Subject("ProjectionVersions")] | ||
public class When_getting_next_version_for_non_versionable_projection | ||
{ | ||
Establish context = () => | ||
{ | ||
MessageInfo.GetContractId(typeof(NonVersionableProjection)); | ||
version = new ProjectionVersion("NonVersionableProjection", ProjectionStatus.Building, 1, "hash"); | ||
nextVersion = new ProjectionVersion("NonVersionableProjection", ProjectionStatus.Building, 1, "hash"); | ||
}; | ||
|
||
Because of = () => versions = new ProjectionVersions(version); | ||
|
||
It should_have_next_version = () => versions.GetNext(new MarkupInterfaceProjectionVersioningPolicy()).ShouldEqual(nextVersion); | ||
It should_not_have_live_version = () => versions.GetLive().ShouldBeNull(); | ||
|
||
It should_not_be__canceled__ = () => versions.IsCanceled(version).ShouldBeFalse(); | ||
It should_not_be__outdated__ = () => versions.IsOutdatad(version).ShouldBeFalse(); | ||
|
||
static ProjectionVersion version; | ||
static ProjectionVersion nextVersion; | ||
static ProjectionVersions versions; | ||
} | ||
} |
24 changes: 12 additions & 12 deletions
24
src/Elders.Cronus.Tests/Projections/When_having_empty_projection_versions.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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
using Machine.Specifications; | ||
//using Machine.Specifications; | ||
|
||
namespace Elders.Cronus.Projections | ||
{ | ||
[Subject("ProjectionVersions")] | ||
public class When_having_empty_projection_versions | ||
{ | ||
Because of = () => versions = new ProjectionVersions(); | ||
//namespace Elders.Cronus.Projections | ||
//{ | ||
// [Subject("ProjectionVersions")] | ||
// public class When_having_empty_projection_versions | ||
// { | ||
// Because of = () => versions = new ProjectionVersions(); | ||
|
||
It should_not_have_next_version = () => versions.GetNext().ShouldBeNull(); | ||
It should_not_have_live_version = () => versions.GetLive().ShouldBeNull(); | ||
// It should_not_have_next_version = () => versions.GetNext().ShouldBeNull(); | ||
// It should_not_have_live_version = () => versions.GetLive().ShouldBeNull(); | ||
|
||
static ProjectionVersions versions; | ||
} | ||
} | ||
// static ProjectionVersions versions; | ||
// } | ||
//} |
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
Oops, something went wrong.