예제 #1
0
        public void ShouldReturnNoneIfNoMatchingHistoryItems()
        {
            var workItem = new WorkItemViewModel {
                Fields = new Dictionary <string, string>()
            };

            workItem.Fields.Add(Constants.WorkItemTypeField, Constants.WorkItemTypeTask);
            workItem.Updates = UpdateBuilder.Create()
                               .New()
                               .Then().Activated()
                               .Then().Resolved()
                               .Build();

            var result = _classifier.Classify(new WorkItemResolutionRequest {
                WorkItem = workItem
            });

            result.Should().BeEmpty();
        }
        public void ShouldReturnNoneIfNoMatchingHistoryItems()
        {
            var workItem = new VSTSWorkItem {
                Fields = new Dictionary <string, string>()
            };

            workItem.Fields.Add(VSTSFieldNames.WorkItemType, WorkItemTypes.Task);
            workItem.Updates = UpdateBuilder.Create()
                               .New()
                               .Then().Activated()
                               .Then().Resolved()
                               .Build();

            var result = _classifier.Classify(new WorkItemResolutionRequest {
                WorkItem = workItem
            });

            result.Should().NotBeNull();
            result.IsNone.Should().BeTrue();
        }