https://mooseframework.inl.gov
TestSetupStatusComponent.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 #include "FlowChannelBase.h"
12 
13 registerMooseObject("ThermalHydraulicsTestApp", TestSetupStatusComponent);
14 
17 {
19 
20  params.addRequiredParam<std::string>("flow_channel", "Name of flow channel to use for test");
21 
22  return params;
23 }
24 
26  : Component(params)
27 {
28 }
29 
30 void
32 {
33  const FlowChannelBase & flow_channel = getComponent<FlowChannelBase>("flow_channel");
34 
35  // This call should throw an error because FlowChannelBase initializes the data required
36  // by this call in its init() function, which due to the ordering in the
37  // test input file, should not have been called at this point.
38  flow_channel.getFlowModel();
39 }
A base class for flow channels.
Component used to test setup-status-checking capability.
static InputParameters validParams()
Definition: Component.C:18
void addRequiredParam(const std::string &name, const std::string &doc_string)
virtual std::shared_ptr< const FlowModel > getFlowModel() const
registerMooseObject("ThermalHydraulicsTestApp", TestSetupStatusComponent)
virtual void init() override
Initializes the component.
Base class for THM components.
Definition: Component.h:27
static InputParameters validParams()
TestSetupStatusComponent(const InputParameters &params)