Example #1
0
        public void TestIsValid()
        {
            Blab harness  = new Blab();
            bool expected = true;
            bool actual   = harness.IsValid();

            Assert.AreEqual(actual.ToString(), expected.ToString());
        }
Example #2
0
        public void TestIsValidFail00()
        {
            User test  = new User();
            Blab Stark = new Blab(test);

            Stark.Id = Guid.Empty;
            var expected = "Value cannot be null.";

            var actual = Assert.ThrowsException <ArgumentNullException>(() => Stark.IsValid());

            Assert.AreEqual(expected, actual.Message.ToString());
        }
Example #3
0
        public void TestIsValidFailNullMessage()
        {
            // Arrange
            Blab harness = new Blab();

            harness.Message = null;
            var expected = "Value cannot be null.";
            // Act
            var ex = Assert.ThrowsException <ArgumentNullException>(() => harness.IsValid());

            // Assert
            Assert.AreEqual(expected, ex.Message.ToString());
        }
        public void TestValidation()
        {
            bool actual = harness.IsValid();

            Assert.AreEqual(true, actual);
        }