Beispiel #1
0
        public void ShouldPass_HasProperty_ValidInput()
        {
            var obj = new Testboject();

            Assert.False(obj.HasProperty("Test"));
            Assert.True(obj.HasProperty("Test3"));
        }
Beispiel #2
0
        public void ShouldPass_SetProperty_ValidInput()
        {
            var obj = new Testboject();

            obj.SetProperty("Test1", "salam");

            Assert.True((string)obj.GetPropertyValue("Test1") == "salam");
        }
Beispiel #3
0
        public void ShouldPass_GetPropertyValue_ValidInput()
        {
            var obj = new Testboject()
            {
                Test1 = "salam",
                Test2 = 100
            };

            Assert.True((string)obj.GetPropertyValue("Test1") == "salam");
        }
Beispiel #4
0
        public void ShouldThrow_InvalidOperationException_SetProperty_NotExistProperty()
        {
            var obj = new Testboject();

            Assert.Throws <InvalidOperationException>(() => obj.SetProperty("Test4", "salam"));
        }
Beispiel #5
0
        public void ShouldThrow_NullException_GetPropertyValue_For_NotExistProperty()
        {
            var obj = new Testboject();

            Assert.Throws <ArgumentNullException>(() => obj.GetPropertyValue("Test4"));
        }