예제 #1
0
        public void TestGetSysIdSuccess()
        {
            Blab   harness  = new Blab();
            string expected = harness.getSysId();
            string actual   = harness.getSysId();

            Assert.AreEqual(actual.ToString(), expected.ToString());
            Assert.AreEqual(true, harness.getSysId() is string);
        }
예제 #2
0
        public void TestGetSysId()
        {
            Blab   harness  = new Blab();
            string expected = harness.getSysId();
            //act & assert
            string actual = harness.getSysId();

            Assert.AreEqual(actual, expected);
            Assert.IsInstanceOfType(harness.getSysId(), typeof(string));
        }
예제 #3
0
        public void TestGetSysId()
        {
            // Arrange
            Blab   harness  = new Blab();
            string expected = harness.getSysId();
            // Act
            string actual = harness.getSysId();

            // Assert
            Assert.AreEqual(actual, expected);
            Assert.AreEqual(true, harness.getSysId() is string);
        }
예제 #4
0
        public void TestSysIdDoesEqual()
        {
            Blab harness = new Blab();
            bool equals  = harness.Equals(harness.getSysId());

            Assert.AreEqual(true, equals);
        }
예제 #5
0
        public void TestSysIdDoesNotEqual()
        {
            Blab harness       = new Blab();
            Blab secondHarness = new Blab();
            bool equals        = harness.Equals(secondHarness.getSysId());

            Assert.AreEqual(false, equals);
        }
        public void Add_Blab_GetBySysId_Success()
        {
            Blab newBlab = new Blab();

            newBlab.Message = "Hello, this is Chris blabbing for the first time";
            newBlab.UserID  = "*****@*****.**";
            string sysID = newBlab.getSysId();

            _harness.Add(newBlab);
            Blab blabReturnedFromInMemory = (Blab)_harness.GetBySysId(sysID);

            Assert.AreEqual(blabReturnedFromInMemory, newBlab);
        }
예제 #7
0
        public void TestAddAndGetByID()
        {
            Blab expected = new Blab();

            expected.UserID  = "*****@*****.**";
            expected.Message = "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...";
            string sysID = expected.getSysId();

            harness.Add(expected);

            Blab actual = harness.GetByUserID("*****@*****.**");

            Assert.AreEqual(expected, actual);
        }
        //Class for testing the adding of a blab and getting a user by ID
        public void Update_Blab()
        {
            Blab newBlab = new Blab();

            newBlab.Message = "Hello, this is Chris blabbing for the first time";
            newBlab.UserID  = "*****@*****.**";
            string sysID = newBlab.getSysId();

            _harness.Add(newBlab);
            newBlab.Message = "I lied, this is my second blab";
            _harness.Update(newBlab);
            Blab blabReturnedFromInMemory = (Blab)_harness.GetBySysId(sysID);

            Assert.AreEqual(newBlab, blabReturnedFromInMemory);
        }
예제 #9
0
        public void Add_Blab_GetByUserId_Success()
        {
            //Arrange
            string Email    = "*****@*****.**";
            Blab   Expected = new Blab();

            Expected.Message = "The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested.";
            Expected.UserID  = Email;
            var sysId = Expected.getSysId();

            _harness.Add(Expected);
            // Act
            Blab Actual = (Blab)_harness.GetByUserId(Email);

            // Assert
            Assert.AreEqual(Expected, Actual);
        }
예제 #10
0
        public void Add_Blab_GetByUserId_Success()
        {
            // Arrange
            string Email    = "*****@*****.**";
            Blab   Expected = new Blab();

            Expected.Message = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer gravida posuere pretium. Cras maximus nibh sed accumsan elementum. Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
            Expected.UserID  = Email;
            var sysId = Expected.getSysId();

            _harness.Add(Expected);
            // Act
            Blab Actual = (Blab)_harness.GetByUserId(Email);

            // Assert
            Assert.AreEqual(Expected, Actual);
        }
예제 #11
0
        public void TestGetSysId()
        {
            Blab harness = new Blab();

            Assert.IsInstanceOfType(harness.getSysId(), typeof(string));
        }