Пример #1
0
		public void Appliability_is_tested() 
		{
			var contributor = new MockContributor(true);
			ActiveRecordStarter.AddContributor(contributor);
			ActiveRecordStarter.Initialize(GetConfigSource(), typeof(Post), typeof(Blog));
			Assert.IsTrue(contributor.Tested);
		}
Пример #2
0
		public void Contributor_gets_called()
		{
			var contributor = new MockContributor(true);
			ActiveRecordStarter.AddContributor(contributor);
			ActiveRecordStarter.Initialize(GetConfigSource(), typeof(Post), typeof(Blog));
			Assert.IsTrue(contributor.Called);
		}
Пример #3
0
		public void Contributor_that_doesnt_apply_is_not_called()
		{
			var contributor = new MockContributor(false);
			ActiveRecordStarter.AddContributor(contributor);
			ActiveRecordStarter.Initialize(GetConfigSource(), typeof(Post), typeof(Blog));
			Assert.IsTrue(contributor.Tested);
			Assert.IsFalse(contributor.Called);
		}
Пример #4
0
        public void Contributor_gets_called()
        {
            var contributor = new MockContributor(true);

            ActiveRecordStarter.AddContributor(contributor);
            ActiveRecordStarter.Initialize(GetConfigSource(), typeof(Post), typeof(Blog));
            Assert.IsTrue(contributor.Called);
        }
Пример #5
0
        public void Appliability_is_tested()
        {
            var contributor = new MockContributor(true);

            ActiveRecordStarter.AddContributor(contributor);
            ActiveRecordStarter.Initialize(GetConfigSource(), typeof(Post), typeof(Blog));
            Assert.IsTrue(contributor.Tested);
        }
Пример #6
0
 public override ActiveRecord.Config.IActiveRecordConfiguration GetConfigSource()
 {
     var contributor = new MockContributor();
     return base.GetConfigSource()
         .GetConfiguration(string.Empty)
         .AddContributor(contributor)
         .Source;
 }
Пример #7
0
        public override ActiveRecord.Config.IActiveRecordConfiguration GetConfigSource()
        {
            var contributor = new MockContributor();

            return(base.GetConfigSource()
                   .GetConfiguration(string.Empty)
                   .AddContributor(contributor)
                   .Source);
        }
Пример #8
0
        public void Contributor_that_doesnt_apply_is_not_called()
        {
            var contributor = new MockContributor(false);

            ActiveRecordStarter.AddContributor(contributor);
            ActiveRecordStarter.Initialize(GetConfigSource(), typeof(Post), typeof(Blog));
            Assert.IsTrue(contributor.Tested);
            Assert.IsFalse(contributor.Called);
        }