Ejemplo n.º 1
0
 static void PrintSprintStatus( SprintStatus status )
 {
     Console.WriteLine( "\nSprintStatus\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 );
 }
Ejemplo n.º 2
0
        public void IsNotValid_IfDifferentItemWithSameNameExists()
        {
            var item = new SprintStatus( _sessionFactory.Object )
             {
            Id = Guid.NewGuid(),
            Name = SprintStatuses.ModelData[0].Name,
            Description = "This is just for testing",
            Category = SprintStatusCategory.Active,
            SortSequence = 0,
            StatusCd = 'A',
            IsPredefined = false
             };

             Assert.IsFalse( item.IsValidFor( TransactionType.All ) );
             var messages = item.GetErrorMessages();
             Assert.AreEqual( 1, messages.Count );
             Assert.AreEqual( String.Format( ErrorMessages.NameIsNotUnique, "Sprint Status", item.Name ), messages["Name"] );
        }