Esempio n. 1
0
        public void RulesDataSourceSelector_SetDataSource_GivenNullRulesDataSource_ThrowsArgumentNullException()
        {
            // Arrange
            RulesDataSourceSelector <ContentType, ConditionType> sut = new RulesDataSourceSelector <ContentType, ConditionType>();

            // Assert
            Assert.Throws <ArgumentNullException>(() =>
            {
                // Act
                sut.SetDataSource(null);
            });
        }
Esempio n. 2
0
        public void RulesDataSourceSelector_SetDataSource_GivenRulesDataSourceInstance_ReturnsRulesEngine()
        {
            // Arrange
            RulesDataSourceSelector <ContentType, ConditionType> sut = new RulesDataSourceSelector <ContentType, ConditionType>();

            Mock <IRulesDataSource <ContentType, ConditionType> > mockRulesDataSource = new Mock <IRulesDataSource <ContentType, ConditionType> >();

            // Act
            IConfiguredRulesEngineBuilder <ContentType, ConditionType> actual = sut.SetDataSource(mockRulesDataSource.Object);

            // Assert
            actual.Should().NotBeNull();
        }