public void Initialize() { _testModel1 = new TestModel(); _testModel2 = new TestModel(); _propertyChangedBehavior = new PropertyChangedBehavior(); _component = new TestableBehaviorComponent(_propertyChangedBehavior) { PropertyChanged = () => _eventCount++, }; _component.TestModel1 = _testModel1; // simulate initializing by blazor _propertyChangedBehavior.Component = _component; _propertyChangedBehavior.OnInitialized(); _propertyChangedBehavior.OnParametersSet(); }