1 #include <gtest/gtest.h>
5 namespace commodconverter {
31 cyclus::Composition::Ptr recipe = cyclus::Composition::CreateFromAtom(v);
35 recipe = cyclus::Composition::CreateFromAtom(v);
53 EXPECT_EQ(
capacity, fac->capacity_());
54 EXPECT_EQ(
out_c1, fac->out_commod_());
55 EXPECT_EQ(
out_r1, fac->out_recipe_());
56 EXPECT_EQ(
in_c1, fac->in_commod_());
57 EXPECT_EQ(
in_r1, fac->in_recipe_());
58 EXPECT_EQ(
cost, fac->cost_());
62 TEST_F(CommodConverterTest, clone) {
63 CommodConverter* cloned_fac =
64 dynamic_cast<CommodConverter*
> (src_facility_->Clone());
65 TestInitState(cloned_fac);
69 TEST_F(CommodConverterTest, InitialState) {
71 TestInitState(src_facility_);
75 TEST_F(CommodConverterTest, Print) {
76 EXPECT_NO_THROW(std::string s = src_facility_->str());
81 TEST_F(CommodConverterTest, Tick) {
82 ASSERT_NO_THROW(src_facility_->Tick());
87 TEST_F(CommodConverterTest, Tock) {
88 EXPECT_NO_THROW(src_facility_->Tock());
100 #ifndef CYCLUS_AGENT_TESTS_CONNECTED
103 #define CYCLUS_AGENT_TESTS_CONNECTED cyclus_agent_tests_connected
104 #endif // CYCLUS_AGENT_TESTS_CONNECTED
void capacity_(double c)
the maximum amount processed per timestep
INSTANTIATE_TEST_CASE_P(CommodConverterFac, FacilityTests,::testing::Values(&CommodConverterConstructor))
void out_recipe_(std::string c)
the out recipe
void in_recipe_(std::string c)
the in recipe
void in_commod_(std::string c)
the in commodity
void TestInitState(commodconverter::CommodConverter *fac)
void SetUpCommodConverter()
static int cyclus_agent_tests_connected
void cost_(double c)
the cost per unit out_commod
void process_time_(int t)
the processing time required for a full process
TEST_F(CommodConverterTest, clone)
This Facility is intended to convert a resource from one commodity to another.
void out_commod_(std::string c)
the out commodity
CommodConverter * src_facility_
void max_inv_size_(double c)
the maximum amount allowed in inventory
cyclus::Agent * CommodConverterConstructor(cyclus::Context *ctx)