예제 #1
0
        public void AlterMeta_changes_meta()
        {
            IPersistentMap meta = new DummyMeta();
            IFn fn = DummyFn.CreateForMetaAlter(meta);

            ConcreteAReference c = new ConcreteAReference();
            c.alterMeta(fn, null);

            Expect(c.meta(), SameAs(meta));
        }
예제 #2
0
        public void AlterMeta_changes_meta()
        {
            IPersistentMap meta = new DummyMeta();
            IFn            fn   = DummyFn.CreateForMetaAlter(meta);

            ConcreteAReference c = new ConcreteAReference();

            c.alterMeta(fn, null);

            Expect(c.meta(), SameAs(meta));
        }
예제 #3
0
        public void AlterMeta_changes_meta()
        {
            MockRepository mocks = new MockRepository();
            IPersistentMap meta = mocks.StrictMock<IPersistentMap>();
            IFn fn = mocks.StrictMock<IFn>();
            RMExpect.Call(fn.applyTo(null)).IgnoreArguments().Return(meta);
            mocks.ReplayAll();

            ConcreteAReference c = new ConcreteAReference();
            c.alterMeta(fn, null);

            Expect(c.meta(), EqualTo(meta));
            mocks.VerifyAll();
        }
예제 #4
0
        public void AlterMeta_changes_meta()
        {
            MockRepository mocks = new MockRepository();
            IPersistentMap meta  = mocks.StrictMock <IPersistentMap>();
            IFn            fn    = mocks.StrictMock <IFn>();

            RMExpect.Call(fn.applyTo(null)).IgnoreArguments().Return(meta);
            mocks.ReplayAll();

            ConcreteAReference c = new ConcreteAReference();

            c.alterMeta(fn, null);

            Expect(c.meta(), EqualTo(meta));
            mocks.VerifyAll();
        }