public void ToStringTest() { var target = new PathMemberSelectionRule("A.B.C", MemberSelectionMode.Include); const String expected = "[] = (Include members at A.B.C) ()."; var actual = target.ToString(); actual.Should() .Be(expected); }
public void ToStringTest1() { var target = new PathMemberSelectionRule("A.B", MemberSelectionMode.Exclude, "N", "D"); const String expected = "[N] = (Exclude members at A.B) (D)."; var actual = target.ToString(); actual.Should() .Be(expected); }
public void CtorTest() { var expectedName = RandomValueEx.GetRandomString(); var expectedDescription = RandomValueEx.GetRandomString(); var target = new PathMemberSelectionRule("path", MemberSelectionMode.Include, expectedName, expectedDescription); target.RuleName.Should() .Be(expectedName); target.RuleDescription.Should() .Be(expectedDescription); }
public void CtorTest() { var expectedName = RandomValueEx.GetRandomString(); var expectedDescription = RandomValueEx.GetRandomString(); var target = new PathMemberSelectionRule( "path", MemberSelectionMode.Include, expectedName, expectedDescription ); target.RuleName.Should() .Be( expectedName ); target.RuleDescription.Should() .Be( expectedDescription ); }
public void GetSelectionResultTest3() { var target = new PathMemberSelectionRule("A.B.C", MemberSelectionMode.Exclude); const MemberSelectionResult expected = MemberSelectionResult.Neutral; var actual = target.GetSelectionResult(new MemberInformation { MemberPath = "A.B.C.MyString" }); actual.Should() .Be(expected); }
public void GetSelectionResultTest3() { var target = new PathMemberSelectionRule( "A.B.C", MemberSelectionMode.Exclude ); const MemberSelectionResult expected = MemberSelectionResult.Neutral; var actual = target.GetSelectionResult( new MemberInformation { MemberPath = "A.B.C.MyString" } ); actual.Should() .Be( expected ); }
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); }
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 ); }
public void ToStringTest() { var target = new PathMemberSelectionRule( "A.B.C", MemberSelectionMode.Include ); const String expected = "[] = (Include members at A.B.C) ()."; var actual = target.ToString(); actual.Should() .Be( expected ); }
public void ToStringTest1() { var target = new PathMemberSelectionRule( "A.B", MemberSelectionMode.Exclude, "N", "D" ); const String expected = "[N] = (Exclude members at A.B) (D)."; var actual = target.ToString(); actual.Should() .Be( expected ); }