Ejemplo n.º 1
0
        public void ShouldReturnNoneIfNoMatchingHistoryItems()
        {
            var workItem = new WorkItemViewModel {
                Fields = new Dictionary <string, string>()
            };

            workItem.Fields.Add(Constants.WorkItemTypeField, Constants.WorkItemTypeBug);
            workItem.Updates = UpdateBuilder.Create()
                               .Activated()
                               .Then().New()
                               .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.Bug);
            workItem.Updates = UpdateBuilder.Create()
                               .Activated()
                               .Then().New()
                               .Build();

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

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