public void TestAddAndUpdateBlab() { //Arrange string email = "*****@*****.**"; User mockUser = new User(email); Blab blab = new Blab("Now is the time for, blabs...", mockUser); //Act _harness.Add(blab); blab.Message = ""; _harness.Update(blab); var actual = _harness.GetById(blab.Id); //Assert Assert.AreEqual("", actual.Message); }
public void TestUpdateBlab() { //Arrange Blab blab = new Blab("Now is the time for, blabs...", _user); string updatedMessage = "This is my updated blab"; //Act _harness.Add(blab); blab.Message = updatedMessage; _harness.Update(blab); _harness.GetById(blab.Id); //Assert Assert.AreEqual(updatedMessage, blab.Message); _harness.Remove(blab); }
public void TestBlabUpdate() { //Arrange Blab blab = new Blab(_message, _testUser); //Act _harness.Add(blab); blab.Message = "test"; _harness.Update(blab); ArrayList actual = (ArrayList)_harness.GetByUserId(_testUser.Email); Blab mockBlab = (Blab)actual[0]; //Assert Assert.AreEqual(blab.Message.ToString(), mockBlab.Message.ToString()); }
public void UpdateBlabTest() { User testUser = new User("*****@*****.**"); string message1 = "You are all free... if you weren't already"; string message2 = "Better clench up Legolas"; Blab blab = new Blab(message1, testUser); _harness.Add(blab); blab.Message = message2; _harness.Update(blab); var expected = _harness.GetByUserMessage(blab); var actual = _harness.GetByUserMessage(blab); Assert.AreEqual(expected.Message, actual.Message); }