Exemplo n.º 1
0
        public void FactoryNameTest()
        {
            var target = new InstanceFactoryBaseAccessor("1", "2");

            target.FactoryName.Should()
            .Be("1");
        }
Exemplo n.º 2
0
        public void SelectionRulesTest()
        {
            var target = new InstanceFactoryBaseAccessor("1", "2");

            target.SelectionRules.Count.Should()
            .Be(0);
        }
Exemplo n.º 3
0
        public void CreateValueTest()
        {
            var    target = new InstanceFactoryBaseAccessor("1", "2");
            Action test   = () => target.CreateValue(new MemberInformation());

            test.ShouldThrow <NotImplementedException>();
        }
Exemplo n.º 4
0
        public void FactoryDescriptionTest()
        {
            var target = new InstanceFactoryBaseAccessor("1", "2");

            target.FactoryDescription.Should()
            .Be("2");
        }
Exemplo n.º 5
0
        public void AddSelectionRuleArgumentNullExceptionTest()
        {
            var target = new InstanceFactoryBaseAccessor("1", "2");
            // ReSharper disable once AssignNullToNotNullAttribute
            Action test = () => target.AddSelectionRule(null);

            test.ShouldThrow <ArgumentNullException>();
        }
Exemplo n.º 6
0
 public void ToStringTest()
 {
     var target = new InstanceFactoryBaseAccessor( "1", "2" );
     const String expected = "[1] = (2).";
     var actual = target.ToString();
     actual.Should()
           .Be( expected );
 }
Exemplo n.º 7
0
        public void ToStringTest()
        {
            var          target   = new InstanceFactoryBaseAccessor("1", "2");
            const String expected = "[1] = (2).";
            var          actual   = target.ToString();

            actual.Should()
            .Be(expected);
        }
Exemplo n.º 8
0
        public void AddSelectionRuleTest()
        {
            var target          = new InstanceFactoryBaseAccessor("1", "2");
            var expectedRule    = new PathMemberSelectionRule("Path", MemberSelectionMode.Include);
            var expectedFactory = target.AddSelectionRule(expectedRule);

            expectedFactory.Should()
            .BeSameAs(target);
            expectedRule.Should()
            .BeSameAs(target.SelectionRules.First());
            target.SelectionRules.Count.Should()
            .Be(1);
        }
Exemplo n.º 9
0
        public void AddSelectionRuleTest()
        {
            var target = new InstanceFactoryBaseAccessor( "1", "2" );
            var expectedRule = new PathMemberSelectionRule( "Path", MemberSelectionMode.Include );
            var expectedFactory = target.AddSelectionRule( expectedRule );

            expectedFactory.Should()
                           .BeSameAs( target );
            expectedRule.Should()
                        .BeSameAs( target.SelectionRules.First() );
            target.SelectionRules.Count.Should()
                  .Be( 1 );
        }
Exemplo n.º 10
0
 public void SelectionRulesTest()
 {
     var target = new InstanceFactoryBaseAccessor( "1", "2" );
     target.SelectionRules.Count.Should()
           .Be( 0 );
 }
Exemplo n.º 11
0
 public void FactoryNameTest()
 {
     var target = new InstanceFactoryBaseAccessor( "1", "2" );
     target.FactoryName.Should()
           .Be( "1" );
 }
Exemplo n.º 12
0
 public void FactoryDescriptionTest()
 {
     var target = new InstanceFactoryBaseAccessor( "1", "2" );
     target.FactoryDescription.Should()
           .Be( "2" );
 }
Exemplo n.º 13
0
 public void CreateValueTest()
 {
     var target = new InstanceFactoryBaseAccessor( "1", "2" );
     Action test = () => target.CreateValue( new MemberInformation() );
     test.ShouldThrow<NotImplementedException>();
 }
Exemplo n.º 14
0
 public void AddSelectionRuleArgumentNullExceptionTest()
 {
     var target = new InstanceFactoryBaseAccessor( "1", "2" );
     Action test = () => target.AddSelectionRule( null );
     test.ShouldThrow<ArgumentNullException>();
 }