public void TestAddAndGetBlab() { //Arrange Blab blab = new Blab("Now is the time for, blabs...", _user); //Act _harness.Add(blab); ArrayList actual = (ArrayList)_harness.GetByUserId(_email); //Assert Assert.AreEqual(1, actual.Count); _harness.Remove(blab); }
public void RemoveBlabTest() { Blab blab = new Blab("This is a test"); _harness.Add(blab); var expected = _harness.GetById(blab.Id); _harness.Remove(blab); var actual = Assert.ThrowsException <BlabAdapterNotFoundException>(() => _harness.GetById(blab.Id)); Assert.AreNotEqual(expected, actual.Message.ToString()); }
public void TestAddAndRemoveAll() { //Arrange string email = "*****@*****.**"; User mockUser = new User(email); Blab blab = new Blab("Now is the time for, blabs...", mockUser); //Act _harness.Add(blab); _harness.Remove(blab); _harness.RemoveAll(); var actual = _harness.GetById(blab.Id); }
public void TestAddAndDelete() { //Act _harness.Add(_testBlab); //Delete From DB _harness.Remove(_testBlab); //Retrieve from DB by email, returns null if no row found Blab actual = _harness.GetByBlabId(_testBlab.Id); //Assert Assert.AreNotEqual(_testBlab, actual); }
public void TestAddAndGetBlab() { //Arrange string email = "*****@*****.**"; User mockUser = new User(email); Blab blab = new Blab("initial test blab", mockUser); //Act _harness.Add(blab); ArrayList actual = (ArrayList)_harness.GetByUserId(email); //Assert Assert.AreEqual(1, actual.Count); _harness.Remove(blab); }
public void TestAddAndGetBlab() { BlabAdapter _harness = new BlabAdapter(new MySqlBlab()); //Arrange string email = "*****@*****.**"; User mockUser = new User(email); Blab blab = new Blab(mockUser, "Now is the time for, blabs..."); //Act _harness.Add(blab); ArrayList actual = (ArrayList)_harness.GetByUserId(email); //Assert Assert.AreEqual(1, actual.Count); _harness.Remove(blab); }
public void TearDown() { _harness.Remove(blab); _harness.Remove(blab1); _harness.Remove(blab2); _harness.Remove(blab3); _harness.Remove(blab4); if (removeAll == true) { removeAll = false; for (int i = 0; i < allBlabs.Count; i++) { _harness.Add((Blab)allBlabs[i]); } } }