Пример #1
0
 static void PrintAcceptanceCriteriaStatus( AcceptanceCriterionStatus status )
 {
     Console.WriteLine( "\nAcceptanceCriteriaStatus\n" );
      Console.WriteLine( "\tId: " + status.Id.ToString() );
      Console.WriteLine( "\tName: " + status.Name );
      Console.WriteLine( "\tDescription: " + status.Description );
      Console.WriteLine( "\tStatusCd: " + status.StatusCd );
      Console.WriteLine( "\tCategory: " + status.Category );
      Console.WriteLine( "\tIsPredefined: " + status.IsPredefined );
 }
Пример #2
0
        private static void AddAcceptanceCriteria( WorkItem workItem, string name, string description, AcceptanceCriterionStatus status )
        {
            var criterion = new AcceptanceCriterion()
             {
            WorkItem = workItem,
            Name = name,
            Description = description,
            Status = status
             };

             _criteria.Add( criterion );
        }
        public void IsNotValid_IfDifferentItemWithSameNameExists()
        {
            var item = new AcceptanceCriterionStatus( _sessionFactory.Object )
             {
            Id = Guid.NewGuid(),
            Name = AcceptanceCriteriaStatuses.ModelData[0].Name,
            Description = "This is just for testing",
            Category = AcceptanceCriterionStatusCategory.VerificationPassed,
            IsPredefined = false,
            SortSequence = 0,
            StatusCd = 'A'
             };

             Assert.IsFalse( item.IsValidFor( TransactionType.All ) );
             var messages = item.GetErrorMessages();
             Assert.AreEqual( 1, messages.Count );
             Assert.AreEqual( String.Format( ErrorMessages.NameIsNotUnique, "Acceptance Criterion Status", item.Name ), messages["Name"] );
        }
Пример #4
0
 private static void InitializeAcceptanceCriteriaStatuses()
 {
     unverified = AcceptanceCriteriaStatuses.ModelData.First( x => x.Name == "Unverified" );
      accepted = AcceptanceCriteriaStatuses.ModelData.First( x => x.Name == "Accepted" );
      rejected = AcceptanceCriteriaStatuses.ModelData.First( x => x.Name == "Rejected" );
 }