コード例 #1
0
        public void And_should_allow_passing_object()
        {
            var and = new And();

            Assert.AreEqual(true, and.Invoke(true, true));
            Assert.AreEqual(false, and.Invoke(true, false));
            Assert.AreEqual(false, and.Invoke(false, false));
            Assert.AreEqual(typeof(ArrayList), and.Invoke(new ArrayList(), new ArrayList()).GetType());
            Assert.AreEqual(1, and.Invoke(0, 1));
            Assert.AreEqual(0, and.Invoke(1, 0));
            Assert.AreEqual(false, and.Invoke(false, null));
            Assert.AreEqual(null, and.Invoke(null, false));
        }