protected static RepositoryItem AddChild(RepositoryItem parent, ItemId.ItemType itemType) { return(itemType == ItemId.ItemType.Package ? AddChild(parent, ARepositoryItem .WithItemType(itemType).WithParent(new RepositoryItemBuilder().WithId(parent.Id))) : AddChild(parent, ARepositoryItem .WithItemType(itemType).WithParent(new RepositoryItemBuilder().WithId(parent.Id)))); }
protected static RepositoryItem AddElement(RepositoryItem library, string stereotype) { return(AddChild(library, ARepositoryItem .WithItemType(ItemId.ItemType.Element).WithParent(new RepositoryItemBuilder().WithId(library.Id)) .WithStereotype(stereotype))); }
protected static RepositoryItem AddSubLibrary(RepositoryItem parent, string stereotype) { return(AddChild(parent, ARepositoryItem .WithItemType(ItemId.ItemType.Package).WithParent(new RepositoryItemBuilder().WithId(parent.Id)) .WithStereotype(stereotype))); }
public void ShouldNotMatchElements() { AssertValidatorDoesNotMatch(ARepositoryItem.WithItemType(ItemId.ItemType.Element).WithStereotype(libraryStereotype)); }
public void ShouldOnlyMatchPackagesWithTheProperStereotype() { AssertValidatorDoesNotMatch(ARepositoryItem.WithItemType(ItemId.ItemType.Package).WithStereotype("other than " + libraryStereotype)); }