private void when_build_a_snapshot_component_version()
        {
            act = () => { _actualVersion = _builder.Build().FirstOrDefault(); };

            context["and component is not deployed successfully"] = () =>
            {
                before = () => { _itemResource.State = TaskState.Failed; };

                it["should throw invalid operation exception"] = expect <InvalidOperationException>();
            };

            context["and component is deployed sucessfully"] = () =>
            {
                before = () => { _itemResource.State = TaskState.Success; };

                it["should build a version"] = () =>
                {
                    _actualVersion.should_not_be_null();
                };

                it["should build a version with expected component"] = () =>
                {
                    _actualVersion.Component.should_be(_expectedComponent);
                };

                it["should build a version with expected release id"] = () =>
                {
                    _actualVersion.ReleaseId.should_be(_releaseId);
                };

                it["should build a version with expected release version"] = () =>
                {
                    _actualVersion.ReleaseVersion.should_be(_releaseVersion);
                };
            };
        }
Exemplo n.º 2
0
 private static SnapshotStep CreateStep(SnapshotComponentVersion version, int index)
 {
     return(new SnapshotStep(version, index + 1));
 }
Exemplo n.º 3
0
        private static string GetProjectPriority(SnapshotComponentVersion version)
        {
            var priority = GetProjectGroupPriority(version.Component.ProjectGroupName);

            return($"{priority}{version.Component.ProjectName}");
        }