コード例 #1
0
        private void AssertFail(
            Func <object, ValueParseResult> itemParseFn,
            object collectionToParse)
        {
            ValueParseResult parseResult = CollectionParser.Parse(collectionToParse, itemParseFn);

            Assert.That(parseResult.Success, Is.False);
            Assert.That(parseResult.Value, Is.Null);
            Assert.That(parseResult.ErrorDetails, Is.Not.Empty);
        }
コード例 #2
0
        private void AssertSuccess(
            Func <object, ValueParseResult> itemParseFn,
            object collectionToParse,
            IEnumerable expectedCollection)
        {
            ValueParseResult parseResult = CollectionParser.Parse(collectionToParse, itemParseFn);

            Assert.That(parseResult.Success, Is.True);
            Assert.That(parseResult.Value, Is.EquivalentTo(expectedCollection));
        }
コード例 #3
0
 public static MessageBuildResult Build(
     string token,
     IEnumerable <ObjectProperty> superProperties,
     object rawProperties,
     object distinctId,
     MixpanelConfig config)
 {
     return(PeopleMessageBuilderBase.CreateMessage(
                token,
                superProperties,
                rawProperties,
                distinctId,
                config,
                "$union",
                rawValue => CollectionParser.Parse(rawValue, _ => GenericPropertyParser.Parse(_, allowCollections: false))));
 }