static void PrintProjectStatus( ProjectStatus status ) { Console.WriteLine( "\nProjectStatus\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 ); }
public void IsNotValid_IfDifferentItemWithSameNameExists() { var item = new ProjectStatus( _sessionFactory.Object ) { Id = Guid.NewGuid(), Name = ProjectStatuses.ModelData[0].Name, Description = "This is just for testing", Category = ProjectStatusCategory.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, "Project Status", item.Name ), messages["Name"] ); }