UnimplementedOCBTest.cc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2017 committers of YAKINDU and others.
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors:
  9. * committers of YAKINDU - initial API and implementation
  10. */
  11. #include <string>
  12. #include "gtest/gtest.h"
  13. #include "UnimplementedOCB.h"
  14. #include "OCBDefaultInterfaceImpl.h"
  15. #include "OCBInternalImpl.h"
  16. #include "OCBNamedInterfaceImpl.h"
  17. TEST(UnimplementedOCBTest, UnimplementedOCBTest) {
  18. UnimplementedOCB* statechart = new UnimplementedOCB();
  19. OCBDefaultInterfaceImpl* di = new OCBDefaultInterfaceImpl();
  20. OCBNamedInterfaceImpl* ni = new OCBNamedInterfaceImpl();
  21. OCBInternalImpl* ii = new OCBInternalImpl();
  22. EXPECT_TRUE(statechart->init() < 0);
  23. statechart->setDefaultSCI_OCB(di);
  24. EXPECT_TRUE(statechart->init() < 0);
  25. statechart->setSCI_Named_OCB(ni);
  26. EXPECT_TRUE(statechart->init() < 0);
  27. statechart->setInternalSCI_OCB(ii);
  28. EXPECT_TRUE(statechart->init() == 0);
  29. delete statechart;
  30. }