Ejemplo n.º 1
0
        public void AddAdditional_Works()
        {
            var mock       = new Mock <IToMock>();
            var additional = "Additional";

            mock.AddAdditional(additional);

            Assert.That(mock.GetAdditional <string>(), Is.EqualTo(additional));
        }
Ejemplo n.º 2
0
        public ISequence CreateSingle <T>(Mock <T> mock, int loops) where T : class
        {
            var sequence = mock.GetAdditional <Sequence>();

            if (sequence == null)
            {
                sequence = new Sequence(loops);
                mock.AddAdditional(sequence);
            }
            return(sequence);
        }