public void Setup()
 {
     //Arrange
     allBlabs = (ArrayList)_harness.GetAll();
     email    = "*****@*****.**";
     mockUser = new User(email);
     blab     = new Blab("Now is the time for, blabs...", mockUser);
     blab1    = new Blab("Here is some dummy text", mockUser);
     blab2    = new Blab("Message number two", mockUser);
     blab3    = new Blab("delete1", mockUser);
     blab4    = new Blab("Get by Guid", mockUser);
 }
Beispiel #2
0
        public void AddAndGetAllTest()
        {
            User   testUser = new User("*****@*****.**");
            string message1 = "You are all free... if you weren't already";
            Blab   blab     = new Blab(message1, testUser);

            _harness.Add(blab);

            ArrayList blabs  = (ArrayList)_harness.GetAll();
            Blab      actual = (Blab)blabs[0];

            Assert.AreEqual(blab.Id.ToString(), actual.Id.ToString());
        }
        public void TestAddAndReadAll()
        {
            adapter.Add(newBlab);
            var BlabList = (ArrayList)adapter.GetAll();

            foreach (Blab blab in BlabList)
            {
                if (blab == newBlab)
                {
                    Assert.AreEqual(blab.Id, newBlab.Id);
                }
            }
        }
Beispiel #4
0
        public void TestAddAndGetAll()
        {
            //Arrange
            Blab blab     = new Blab(_message, _testUser);
            User mockUser = new User("*****@*****.**");
            Blab blabTwo  = new Blab(_message, mockUser);

            //Act
            _harness.Add(blab);
            _harness.Add(blabTwo);
            ArrayList actual = (ArrayList)_harness.GetAll();

            //Assert
            Assert.AreEqual(2, actual.Count);
        }
Beispiel #5
0
        public void TestReadAll()
        {
            //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.GetAll();

            //Assert
            if (actual.Count > 0)
            {
                Assert.IsTrue(true);
            }
        }
 public IEnumerable GetAll()
 {
     return(_adapter.GetAll());
 }
 public IEnumerable GetAll()
 {
     return(BlabAdapter.GetAll());
 }