コード例 #1
0
        public void Test_BeTested_Constructor()
        {
            Interface_One one = new IsOne();
            // Constructor one
            var target   = new BeTested(one);
            var result   = target.GetInternalNum();
            var expected = -1;

            Assert.AreEqual(expected, result, "Are they equal? {0} == {1}", new object[] { expected, result });
        }
コード例 #2
0
        public void Test_IsOne_Constructor()
        {
            var realObject = new IsOne();

            Assert.AreEqual(111, realObject.Num);
            Assert.IsFalse(realObject.DoSth1(0));
            Assert.IsTrue(realObject.DoSth1(111));

            var realObject2 = new IsOne(222);

            Assert.AreEqual(222, realObject2.Num);
            Assert.IsFalse(realObject2.DoSth1(0));
            Assert.IsTrue(realObject2.DoSth1(222));
            realObject2.Num = 999;
            Assert.AreEqual(999, realObject2.Num);
        }
コード例 #3
0
ファイル: ItemFactory.cs プロジェクト: nickmayer/mediabrowser
 public void AddFactory(IsOne isOne, Type type)
 {
     itemFactoryItems.Add(isOne, type);
 }
コード例 #4
0
 public void AddFactory(IsOne isOne, Type type)
 {
     itemFactoryItems.Add(isOne,type);
 }