示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp()
        public virtual void SetUp()
        {
            _txApplier1 = mock(typeof(TransactionApplier));
            _txApplier2 = mock(typeof(TransactionApplier));
            _txApplier3 = mock(typeof(TransactionApplier));

            _facade = new TransactionApplierFacade(_txApplier1, _txApplier2, _txApplier3);
        }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testStartTxCorrectOrder() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void TestStartTxCorrectOrder()
        {
            // GIVEN
            TransactionToApply tx = mock(typeof(TransactionToApply));

            // WHEN
            TransactionApplierFacade result = ( TransactionApplierFacade )_facade.startTx(tx);

            // THEN
            InOrder inOrder = inOrder(_applier1, _applier2, _applier3);

            inOrder.verify(_applier1).startTx(tx);
            inOrder.verify(_applier2).startTx(tx);
            inOrder.verify(_applier3).startTx(tx);

            assertEquals(_txApplier1, result.Appliers[0]);
            assertEquals(_txApplier2, result.Appliers[1]);
            assertEquals(_txApplier3, result.Appliers[2]);
            assertEquals(3, result.Appliers.Length);
        }