Skip to content

feat: add abstract DependencyConsumer base class for DI consumers #142

feat: add abstract DependencyConsumer base class for DI consumers

feat: add abstract DependencyConsumer base class for DI consumers #142

GitHub Actions / Test Results completed Sep 21, 2023 in 0s

✅ Test Results - 110/110 - Passed in 37.491s

✅ editmode-results.xml - 20/20 - Passed in 35.892s

✅ playmode-results.xml - 90/90 - Passed in 1.599s

Details

✅ editmode-results.xml - 20/20 - Passed in 35.892s
  • ✅ UIComponents.Benchmarks.AssetLoading.AddressablesAssetLoadBenchmarks - 2/2 - Passed in 6.104s
    • InitializeComponentWithColdCache - Passed in 3.240s
    • InitializeComponentWithWarmCache - Passed in 2.865s
  • ✅ UIComponents.Benchmarks.AssetLoading.AssetDatabaseAssetLoadBenchmarks - 2/2 - Passed in 3.444s
    • InitializeComponentWithColdCache - Passed in 1.728s
    • InitializeComponentWithWarmCache - Passed in 1.716s
  • ✅ UIComponents.Benchmarks.AssetLoading.ResourcesAssetLoadBenchmarks - 2/2 - Passed in 5.035s
    • InitializeComponentWithColdCache - Passed in 2.019s
    • InitializeComponentWithWarmCache - Passed in 3.016s
  • ✅ UIComponents.Benchmarks.UIComponentInitBenchmarks - 4/4 - Passed in 11.739s
    • InitializeComponentWithDependencyWithColdCache - Passed in 2.923s
    • InitializeComponentWithDependencyWithWarmCache - Passed in 3.012s
    • InitializeEmptyComponentWithColdCache - Passed in 2.961s
    • InitializeEmptyComponentWithWarmCache - Passed in 2.843s
  • ✅ UIComponents.Tests.Editor.AssetDatabaseAssetResolverTests - 2/2 - Passed in 0.098s
    • Should_Be_Able_To_Load_Existing_Asset - Passed in 0.055s
    • Should_Be_Able_To_Tell_If_Asset_Exists - Passed in 0.043s
  • ✅ UIComponents.Tests.Editor.Interfaces.UIComponentInterfaceTests - 8/8 - Passed in 9.339s
    • IOnAttachToPanel_Registers_AttachToPanelEvent_Callback - Passed in 2.292s
    • IOnClick_Registers_ClickEvent_Callback - Passed in 1.200s
    • IOnDetachFromPanel_Registers_DetachFromPanelEvent_Callback - Passed in 0.825s
    • IOnGeometryChanged_Registers_GeometryChangedEvent_Callback - Passed in 1.121s
    • IOnMouseEnter_Registers_MouseEnterEvent_Callback - Passed in 0.842s
    • IOnMouseLeave_Registers_MouseLeaveEvent_Callback - Passed in 1.107s
    • IOnMyCustomEvent_Registers_MyCustomEvent_Callback - Passed in 0.827s
    • IOnNavigationMove_Registers_NavigationMoveEvent_Callback - Passed in 1.126s
✅ playmode-results.xml - 90/90 - Passed in 1.599s
  • ✅ UIComponents.Tests.DebugLoggerTests - 3/3 - Passed in 0.119s
    • Log_Uses_Debug_Log - Passed in 0.110s
    • LogError_Uses_Debug_LogError - Passed in 0.005s
    • LogWarning_Uses_Debug_LogWarning - Passed in 0.004s
  • ✅ UIComponents.Tests.DependencyConsumerTests - 4/4 - Passed in 0.020s
    • TestBed_Works_With_DependencyConsumers - Passed in 0.006s
    • The_Correct_Class_Is_Provided_To_EmptyStringDependencyConsumer - Passed in 0.006s
    • The_Correct_Class_Is_Provided_To_StringDependencyConsumer - Passed in 0.003s
    • TryProvide_Works_For_EmptyStringDependencyConsumer - Passed in 0.005s
  • ✅ UIComponents.Tests.DependencyInjectorTests - 2/2 - Passed in 0.131s
    • Can_Be_Created_Using_Consumer - Passed in 0.126s
    • Can_Be_Created_Without_Consumer - Passed in 0.005s
  • ✅ UIComponents.Tests.DependencyInjectorTests+Provide - 3/3 - Passed in 0.017s
    • Returns_Desired_Dependency - Passed in 0.005s
    • Returns_Transient_Dependency_If_Singleton_And_Transient_Are_Registered - Passed in 0.004s
    • Throws_If_No_Provider_Exists - Passed in 0.008s
  • ✅ UIComponents.Tests.DependencyInjectorTests+SetConsumer - 1/1 - Passed in 0.004s
    • Refreshes_Transient_Dependencies - Passed in 0.004s
  • ✅ UIComponents.Tests.DependencyInjectorTests+SetTransientInstance - 1/1 - Passed in 0.004s
    • Switches_A_Transient_Instance - Passed in 0.004s
  • ✅ UIComponents.Tests.DependencyInjectorTests+TryProvide - 2/2 - Passed in 0.007s
    • Returns_If_Dependency_Could_Be_Provided - Passed in 0.004s
    • Yields_Null_If_Dependency_Can_Not_Be_Provided - Passed in 0.003s
  • ✅ UIComponents.Tests.DependencyTests - 7/7 - Passed in 0.028s
    • Allows_Creating_An_Instance - Passed in 0.003s
    • Allows_Fetching_Dependency_Type - Passed in 0.003s
    • Allows_Fetching_Implementation_Type - Passed in 0.003s
    • Allows_Fetching_Scope - Passed in 0.005s
    • Constructor_Throws_On_Null_Factory - Passed in 0.007s
    • SingletonFor_Returns_Singleton_Scope - Passed in 0.003s
    • TransientFor_Returns_Transient_Scope - Passed in 0.003s
  • ✅ UIComponents.Tests.DiContextTests - 5/5 - Passed in 0.026s
    • Allows_Changing_Current_Context - Passed in 0.003s
    • Allows_Checking_Whether_An_Initialized_Injector_Exists - Passed in 0.013s
    • Allows_Getting_Singleton_Instances - Passed in 0.003s
    • Allows_Resetting_Context - Passed in 0.004s
    • Does_Not_Allow_Changing_To_Null_Context - Passed in 0.003s
  • ✅ UIComponents.Tests.DiContextTests+GetInjector - 3/3 - Passed in 0.010s
    • It_Creates_A_New_Injector_If_One_Does_Not_Exist - Passed in 0.003s
    • It_Throws_If_Consumer_Type_Is_Null - Passed in 0.003s
    • It_Yields_Existing_Injector - Passed in 0.003s
  • ✅ UIComponents.Tests.DiContextTests+RegisterConsumer - 1/1 - Passed in 0.004s
    • It_Populates_Singleton_Instances - Passed in 0.004s
  • ✅ UIComponents.Tests.LayoutAttributeTests - 4/4 - Passed in 0.075s
    • Given_Layout_Is_Loaded - Passed in 0.052s
    • Null_Layout_Is_Handled - Passed in 0.008s
    • Superclass_Layout_Is_Loaded_If_It_Is_Not_Overridden - Passed in 0.008s
    • Superclass_Layout_Is_Not_Loaded_If_Overridden - Passed in 0.008s
  • ✅ UIComponents.Tests.ProvideAttributeTests - 4/4 - Passed in 0.018s
    • Allows_Providing_Dependencies_With_A_Cast - Passed in 0.006s
    • Logs_Error_On_Invalid_Cast - Passed in 0.004s
    • Logs_Error_When_Provider_Is_Missing - Passed in 0.003s
    • Provides_Dependencies_Automatically - Passed in 0.003s
  • ✅ UIComponents.Tests.QueryAttributeTests - 4/4 - Passed in 0.278s
    • Should_Log_Errors_If_Query_Yields_No_Results - Passed in 0.032s
    • Should_Not_Populate_Invalid_Fields - Passed in 0.221s
    • Should_Populate_Fields - Passed in 0.017s
    • Should_Populate_Inherited_Fields - Passed in 0.008s
  • ✅ UIComponents.Tests.QueryClassAttributeTests - 9/9 - Passed in 0.142s
    • Creates_Empty_List_And_Array_If_No_Elements_Are_Found - Passed in 0.080s
    • Leaves_Field_Null_If_No_Element_Is_Found - Passed in 0.008s
    • Populates_Array_With_All_Elements_With_Class - Passed in 0.013s
    • Populates_Array_With_All_Elements_With_Multiple_Classes - Passed in 0.015s
    • Populates_List_With_All_Elements_With_Class - Passed in 0.006s
    • Populates_Single_Element_With_First_Element_With_Class - Passed in 0.005s
    • Populates_Typed_Array_And_List_With_Elements_Of_Type_And_Class - Passed in 0.006s
    • Populates_Typed_Array_With_Multiple_Classes - Passed in 0.005s
    • Works_With_Both_Name_And_Class_Query - Passed in 0.005s
  • ✅ UIComponents.Tests.ResourcesAssetResolverTests - 2/2 - Passed in 0.013s
    • Should_Be_Able_To_Load_Existing_Asset - Passed in 0.006s
    • Should_Be_Able_To_Tell_If_Asset_Exists - Passed in 0.007s
  • ✅ UIComponents.Tests.RootClassAttributeTests - 2/2 - Passed in 0.010s
    • Adds_Class_To_Component - Passed in 0.005s
    • Adds_Class_To_Component_And_Child_Component - Passed in 0.005s
  • ✅ UIComponents.Tests.StylesheetAttributeTests - 3/3 - Passed in 0.040s
    • Given_Stylesheets_Are_Loaded - Passed in 0.017s
    • Inherited_Stylesheets_Are_Loaded - Passed in 0.012s
    • Invalid_Stylesheets_Output_Error_Message - Passed in 0.011s
  • ✅ UIComponents.Tests.TestBedTests - 6/6 - Passed in 0.045s
    • Allows_Changing_Singleton_Instance - Passed in 0.008s
    • Allows_Creating_Component_With_Singleton_Dependencies - Passed in 0.008s
    • Allows_Creating_Component_With_Transient_Dependencies - Passed in 0.007s
    • Allows_Fetching_Dependencies - Passed in 0.007s
    • Allows_Passing_Constructor_Arguments - Passed in 0.008s
    • Works_On_Non_UIComponent_Type - Passed in 0.008s
  • ✅ UIComponents.Tests.UIComponentDependencyTests - 4/4 - Passed in 0.015s
    • A_Missing_Dependency_Can_Be_Handled_With_TryProvide - Passed in 0.004s
    • The_Correct_Class_Is_Provided_To_Component - Passed in 0.004s
    • The_Correct_Class_Is_Provided_To_Component_When_Overridden - Passed in 0.004s
    • Transient_Dependencies_Are_Not_Cached - Passed in 0.004s
  • ✅ UIComponents.Tests.UIComponentEffectAttributeTests - 1/1 - Passed in 0.005s
    • Effects_Are_Sorted_By_Priority - Passed in 0.005s
  • ✅ UIComponents.Tests.UIComponentNoAttributesTests - 2/2 - Passed in 0.010s
    • No_Layout_Is_Loaded - Passed in 0.005s
    • No_Styles_Are_Loaded - Passed in 0.004s
  • ✅ UIComponents.Tests.UIComponentTests+Initialization - 8/8 - Passed in 0.055s
    • Allows_Waiting_For_Initialization - Passed in 0.010s
    • Asynchronous_Initialization_Happens_Once - Passed in 0.006s
    • Bare_Component_Initializes_Synchronously - Passed in 0.003s
    • Completes_Initialization_Task - Passed in 0.007s
    • Does_Not_Initialize_If_Children_Are_Uninitialized - Passed in 0.009s
    • Initializes_When_Children_Are_Initialized - Passed in 0.011s
    • Sets_The_Initialized_Value - Passed in 0.006s
    • Synchronous_Initialization_Happens_Once - Passed in 0.003s
  • ✅ UIComponents.Tests.Addressables.AddressableAssetResolverTests - 3/3 - Passed in 0.385s
    • Caches_Asset_Existence_Checks - Passed in 0.147s
    • Should_Be_Able_To_Load_Existing_Asset - Passed in 0.213s
    • Should_Be_Able_To_Tell_If_Asset_Exists - Passed in 0.024s
  • ✅ UIComponents.Tests.Roslyn.ProvideErrorTests - 2/2 - Passed in 0.011s
    • Error_Is_Printed_With_DebugLog - Passed in 0.006s
    • Error_Is_Printed_With_Logger - Passed in 0.005s
  • ✅ UIComponents.Tests.Roslyn.UxmlNameTests - 1/1 - Passed in 0.006s
    • Generates_Uxml_Factory_For_Name - Passed in 0.006s
  • ✅ UIComponents.Tests.Roslyn.UxmlTraitTests - 3/3 - Passed in 0.036s
    • Generates_Traits_For_Nested_Class - Passed in 0.005s
    • Generates_Traits_For_Non_UIComponent_Class - Passed in 0.014s
    • Generates_Traits_For_UIComponent_Class - Passed in 0.018s