public void ParseGroupings1Group()
        {
            var map       = new TargetMapper();
            var groupings = "group1: target1,target2";

            map.ParseAliasString(groupings);

            AreCollectionsEqual(new[] { "target1", "target2" }, map.GetNames("group1"));
        }
        public void ParseInvalidGroupsValidate()
        {
            Assert.Throws(typeof(ArgumentOutOfRangeException), () =>
            {
                var map       = new TargetMapper();
                var groupings = "group1 target1,target2; group2: target1, target3";

                map.ParseAliasString(groupings, true);
            });
        }
        public void ParseInvalidGroups()
        {
            var map       = new TargetMapper();
            var groupings = "group1 target1,target2; group2: target1, target3";

            map.ParseAliasString(groupings);

            Assert.Equal("group1", map.GetNames("group1").Single());
            AreCollectionsEqual(new[] { "target1", "target3" }, map.GetNames("group2"));
        }
示例#4
0
        public static void ParseInvalidGroupsValidateAtomicOperation()
        {
            var map       = new TargetMapper();
            var groupings = "group1: target1,target2; group2 target1, target3";

            Assert.Throws <ArgumentOutOfRangeException>(() => map.ParseAliasString(groupings, true));

            Assert.Equal("group1", map.GetNames("group1").Single());
            Assert.Equal("group2", map.GetNames("group2").Single());
        }
        public void ParseGroupingsNull()
        {
            var map = new TargetMapper();

            map.ParseAliasString(null);
        }