public void AddDeltaGood() { IDBManager fakeDatabase = new FakeDBManager(); fakeDatabase.AddDelta(delta); Assert.AreEqual(true, fakeDatabase.DeltaExists(delta.FileId)); }
public void DeltaExistsGood(string id) { IDBManager fakeDatabase = new FakeDBManager(); fakeDatabase.AddDelta(delta); Assert.AreEqual(true, fakeDatabase.DeltaExists(id)); }
public void DeltaExistsBadNull(string id) { IDBManager fakeDatabase = new FakeDBManager(); Assert.Throws <ArgumentNullException>(() => { fakeDatabase.DeltaExists(id); } ); }
public void AddDeltaBadEmptyString(string id, string content, string linerange) { Mock <Delta> deltaDouble2 = new Mock <Delta>(); deltaDouble2.Setup(delta => delta.FileId).Returns(id); deltaDouble2.Setup(delta => delta.Content).Returns(content); deltaDouble2.Setup(delta => delta.LineRange).Returns(linerange); delta = deltaDouble2.Object; IDBManager fakeDatabase = new FakeDBManager(); fakeDatabase.AddDelta(delta); Assert.AreEqual(false, fakeDatabase.DeltaExists(delta.FileId)); }
public void DeltaDoesntExists(string id) { FakeDBManager fakeDatabase = new FakeDBManager(); Assert.AreEqual(false, fakeDatabase.DeltaExists(id)); }