Esempio n. 1
0
 public void Forget_CanClearActionsForSingleClass()
 {
     var faker = new FakeCreator();
     faker.Remember<InternalTestClass>(x => x.Prop1 = "hi");
     faker.Remember<PublicTestClass>(x => x.Field1 = "bye");
     faker.Forget<InternalTestClass>();
     Assert.AreEqual(0, faker.GetRememberedActions<InternalTestClass>().Length);
     Assert.AreEqual(1, faker.GetRememberedActions<PublicTestClass>().Length);
 }
Esempio n. 2
0
 public void ForgetAll_ClearsAllActionsForAllClasses()
 {
     var faker = new FakeCreator();
     faker.Remember<InternalTestClass>(x => x.Prop1 = "hi");
     faker.Remember<PublicTestClass>(x => x.Field1 = "bye");
     faker.ForgetAll();
     Assert.AreEqual(0, faker.GetRememberedActions<InternalTestClass>().Length);
     Assert.AreEqual(0, faker.GetRememberedActions<PublicTestClass>().Length);
 }
Esempio n. 3
0
        public void Forget_CanClearActionsForSingleClass()
        {
            var faker = new FakeCreator();

            faker.Remember <InternalTestClass>(x => x.Prop1 = "hi");
            faker.Remember <PublicTestClass>(x => x.Field1  = "bye");
            faker.Forget <InternalTestClass>();
            Assert.AreEqual(0, faker.GetRememberedActions <InternalTestClass>().Length);
            Assert.AreEqual(1, faker.GetRememberedActions <PublicTestClass>().Length);
        }
Esempio n. 4
0
        public void ForgetAll_ClearsAllActionsForAllClasses()
        {
            var faker = new FakeCreator();

            faker.Remember <InternalTestClass>(x => x.Prop1 = "hi");
            faker.Remember <PublicTestClass>(x => x.Field1  = "bye");
            faker.ForgetAll();
            Assert.AreEqual(0, faker.GetRememberedActions <InternalTestClass>().Length);
            Assert.AreEqual(0, faker.GetRememberedActions <PublicTestClass>().Length);
        }
Esempio n. 5
0
        public void Remeber_AddsMappingsToRemembered()
        {
            var faker = new FakeCreator();

            faker.Remember <InternalTestClass>(x => x.Prop1 = "hi", x => x.Field1 = "bye");
            Assert.AreEqual(2, faker.GetRememberedActions <InternalTestClass>().Length);
        }
Esempio n. 6
0
 public void Remeber_AddsMappingsToRemembered()
 {
     var faker = new FakeCreator();
     faker.Remember<InternalTestClass>(x => x.Prop1 = "hi", x => x.Field1 = "bye");
     Assert.AreEqual(2, faker.GetRememberedActions<InternalTestClass>().Length);
 }