public void op_Delete_whenStorageDefined() { var obj = new Lexicon(NormalityComparer.Ordinal); var storage = new Mock<IStoreLexicon>(); storage.Setup(x => x.Delete(obj)).Verifiable(); obj.Storage = storage.Object; obj.Delete(); storage.VerifyAll(); }
public void op_Delete_IStoreLexicon() { var obj = new Lexicon(NormalityComparer.Ordinal); var storage = new Mock<IStoreLexicon>(); storage.Setup(x => x.Delete(obj)).Verifiable(); obj.Delete(storage.Object); Assert.Same(storage.Object, obj.Storage); storage.VerifyAll(); }
public void op_Delete_whenStorageDefined() { var obj = new Lexicon(NormalityComparer.Ordinal); var storage = new Mock <IStoreLexicon>(); storage.Setup(x => x.Delete(obj)).Verifiable(); obj.Storage = storage.Object; obj.Delete(); storage.VerifyAll(); }
public void op_Delete_IStoreLexicon() { var obj = new Lexicon(NormalityComparer.Ordinal); var storage = new Mock <IStoreLexicon>(); storage.Setup(x => x.Delete(obj)).Verifiable(); obj.Delete(storage.Object); Assert.Same(storage.Object, obj.Storage); storage.VerifyAll(); }