public void op_Save_IStoreLexicon()
        {
            var obj = new Lexicon(NormalityComparer.Ordinal);

            var storage = new Mock <IStoreLexicon>();

            storage.Setup(x => x.Save(obj)).Verifiable();

            obj.Save(storage.Object);

            Assert.Same(storage.Object, obj.Storage);

            storage.VerifyAll();
        }
        public void op_Save_whenStorageDefined()
        {
            var obj = new Lexicon(NormalityComparer.Ordinal);

            var storage = new Mock <IStoreLexicon>();

            storage.Setup(x => x.Save(obj)).Verifiable();

            obj.Storage = storage.Object;

            obj.Save();

            storage.VerifyAll();
        }
Exemple #3
0
        public void op_Save_IStoreLexicon()
        {
            var obj = new Lexicon(NormalityComparer.Ordinal);

            var storage = new Mock<IStoreLexicon>();
            storage.Setup(x => x.Save(obj)).Verifiable();

            obj.Save(storage.Object);

            Assert.Same(storage.Object, obj.Storage);

            storage.VerifyAll();
        }
Exemple #4
0
        public void op_Save_whenStorageDefined()
        {
            var obj = new Lexicon(NormalityComparer.Ordinal);

            var storage = new Mock<IStoreLexicon>();
            storage.Setup(x => x.Save(obj)).Verifiable();

            obj.Storage = storage.Object;

            obj.Save();

            storage.VerifyAll();
        }