Class AchievementConditionTypeMenuTests
EditMode tests for the catalogue the condition tree drawer picks node types from. The dropdown itself is not under test — IMGUI is not a unit; what is testable, and what actually breaks, is the table behind it.
Inherited Members
Namespace: Serenity.UnityAchievements.Tests.Editor
Assembly: Tests.Editor.dll
Syntax
public class AchievementConditionTypeMenuTests
Constructors
AchievementConditionTypeMenuTests()
Declaration
public AchievementConditionTypeMenuTests()
Methods
CategoryLabel_GivesEveryCategoryADistinctHeading()
Declaration
public void CategoryLabel_GivesEveryCategoryADistinctHeading()
CategoryLabel_NamesEveryDeclaredCategory()
Declaration
public void CategoryLabel_NamesEveryDeclaredCategory()
CategoryLabel_RefusesACategoryItDoesNotName()
Proves the mapping has no default: arm quietly absorbing an unnamed category: a
value outside the enum has to fail rather than be shelved under a fallback heading.
Declaration
public void CategoryLabel_RefusesACategoryItDoesNotName()
CreateInstance_MakesANodeForEveryEntry()
Declaration
public void CreateInstance_MakesANodeForEveryEntry()
CreateInstance_RefusesAnythingThatIsNotACreatableCondition()
Declaration
public void CreateInstance_RefusesAnythingThatIsNotACreatableCondition()
DisplayNameOf_NamesAnEmptySlotNothing()
Declaration
public void DisplayNameOf_NamesAnEmptySlotNothing()
Entries_AreLabelledWithTheNodesOwnDisplayName()
The menu label and the node header have to be the same words, or an author picks "Score Threshold" and gets a node calling itself something else.
Declaration
public void Entries_AreLabelledWithTheNodesOwnDisplayName()
Entries_AreListedOnlyOnce()
Declaration
public void Entries_AreListedOnlyOnce()
Entries_ExcludeConditionTypesDeclaredInATestAssembly()
The exclusion the production catalogue exists for: a condition type declared in a test assembly is real, loaded, and visible to TypeCache for the whole duration of this test run — the same as it would be for a project's own test assembly sitting beside its game code — yet the default catalogue must never offer it.
Declaration
public void Entries_ExcludeConditionTypesDeclaredInATestAssembly()
Entries_FillEveryCategoryTheMenuDeclares()
Declaration
public void Entries_FillEveryCategoryTheMenuDeclares()
Entries_IncludeAProjectAuthoredConditionUnderItsDeclaredCategoryAfterTheFrameworkEntries()
The rule the reflection-built catalogue exists for: a condition the framework's own catalogue order never named is still pickable, shelved under the category it declares, and appended after every framework entry rather than interleaved with them.
Declaration
public void Entries_IncludeAProjectAuthoredConditionUnderItsDeclaredCategoryAfterTheFrameworkEntries()
Remarks
Built through Build(IEnumerable<Type>) with an explicit candidate
list rather than read off the default Entries: AchievementConditionTypeMenuTests.TestOnlyAttributedCondition
lives in a test assembly, so the production catalogue — which excludes test assemblies —
never offers it.
Entries_OfferNothingThatIsNotAConcreteCondition()
Declaration
public void Entries_OfferNothingThatIsNotAConcreteCondition()
TryCategoryLabel_AnswersRatherThanThrowingForACategoryItDoesNotName()
The drawing path asks this one, and it must answer rather than throw: an exception raised while the picker is being built would take the whole inspector down with it.
Declaration
public void TryCategoryLabel_AnswersRatherThanThrowingForACategoryItDoesNotName()
TryCategoryLabel_NamesEveryDeclaredCategory()
Declaration
public void TryCategoryLabel_NamesEveryDeclaredCategory()
UnattributedConditionTypes_FallBackToCodeCategoryAndLogOnlyOnce()
A condition type that compiles but never declares where it belongs still has to be pickable — it falls back to Code rather than vanishing from the picker, and the fallback is announced once rather than on every scan.
Declaration
public void UnattributedConditionTypes_FallBackToCodeCategoryAndLogOnlyOnce()
Remarks
Built through Build(IEnumerable<Type>) for the same reason as above: AchievementConditionTypeMenuTests.TestOnlyUnattributedCondition is not in the default catalogue's candidate set to begin with.