NamedInterfaceAccessTest.cc 930 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * Copyright (c) 2013 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 "NamedInterfaceAccess.h"
  14. TEST(StatemachineTest, SafeOpenSuccess) {
  15. NamedInterfaceAccess* statechart = new NamedInterfaceAccess();
  16. statechart->init();
  17. statechart->enter();
  18. statechart->runCycle();
  19. statechart->getSCIUser()->raise_numberPressed(3);
  20. statechart->runCycle();
  21. statechart->getSCIUser()->raise_numberPressed(7);
  22. statechart->runCycle();
  23. statechart->getSCIUser()->raise_numberPressed(5);
  24. statechart->runCycle();
  25. EXPECT_TRUE(getSCTSafe()->isRaised_open());
  26. delete statechart;
  27. }