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(); }
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(); }