public void TestAddAndGetBlab() { //Act _harness.Add(blab); ArrayList actual = (ArrayList)_harness.GetByUserId(email); //Assert Assert.AreEqual(1, actual.Count); }
public void TestAddAndGetBlab() { //Arrange string email = "*****@*****.**"; User mockUser = new User(email); Blab blab = new Blab("test", mockUser); //Act _harness.Add(blab); ArrayList actual = (ArrayList)_harness.GetByUserId(email); //Assert Assert.AreEqual(1, actual.Count); }
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 TestAddAndGetByUserIdBlab() { //Arrange string email = "*****@*****.**"; Blab blab = new Blab("Now is the time for blabs...", new User(email)); this._harness.Add(blab); //Act ArrayList actual = (ArrayList)_harness.GetByUserId(email); //Assert Assert.AreEqual(1, actual.Count); }
public void SQLCreate() { //mock User and Blab string email = "*****@*****.**"; User user = new User(email); Blab blab = new Blab("Test", user); //Add blab to database adapter.Add(blab); //get blab from database ArrayList actual = (ArrayList)adapter.GetByUserId(email); //Gets single blab from user Assert.AreEqual(1, actual.Count); }
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 TestAddAndGetBlab() { //Arrange string email = "*****@*****.**"; User mockUser = new User(email); Blab blab = new Blab("Now is the time for, blabs...", mockUser); //Act _harness.Add(blab); ArrayList actual = (ArrayList)_harness.GetByUserId(email); //Assert if (actual.Count == 1) { Assert.AreEqual(1, actual.Count); } else { Assert.AreNotEqual(1, actual.Count); } }
public IEnumerable FindUserBlabs(string email) { return(_adapter.GetByUserId(email)); }