Esempio n. 1
0
        public void Successor_test()
        {
            // Arrange
            var assembler1 = new TestAssemblyLineEnd();
            var assembler2 = new TestAssemblyLine(assembler1);
            var assembler3 = new TestAssemblyLine(assembler2);

            // Act
            var restored = assembler3.Restore("one");
            var created  = assembler3.Create(2);

            // Assert
            Assert.AreEqual(assembler1.Restored, restored);
            Assert.AreEqual(assembler1.Created, created);
        }
Esempio n. 2
0
        public void Successor_test()
        {
            // Arrange
            var assembler1 = MockRepository.GenerateMock <AssemblyLine <int, string> >((AssemblyLine <int, string>)null);
            var assembler2 = new TestAssemblyLine(assembler1);
            var assembler3 = new TestAssemblyLine(assembler2);

            assembler1.Expect(x => x.Restore("one")).Return(default(int));
            assembler1.Expect(x => x.Create(2)).Return(default(string));

            // Act
            var restored = assembler3.Restore("one");
            var created  = assembler3.Create(2);

            // Assert
            Assert.AreEqual(default(int), restored);
            Assert.AreEqual(default(string), created);
            assembler1.VerifyAllExpectations();
        }