Ejemplo n.º 1
0
        public void WillIndexNewProperties()
        {
            var searchIndex = new EventIndexDefinition <CustomEventDtoE>();

            Assert.NotNull(searchIndex.Field("Sender"));

            const string sender = "Test";
            var          dto    = new CustomEventDtoE {
                Sender = Encoding.ASCII.GetBytes(sender)
            };
            var valueAsBytes  = searchIndex.Field("Sender").GetValue(dto) as byte[];
            var valueAsString = Encoding.ASCII.GetString(valueAsBytes);

            Assert.Equal(sender, valueAsString);
        }
Ejemplo n.º 2
0
        public void StaticPropertiesOnDtoAreIgnored()
        {
            var searchIndex = new EventIndexDefinition <TransferEvent_Custom>(addPresetEventLogFields: false);

            Assert.Null(searchIndex.Field("Metadata.CurrentChainUrl"));
        }
Ejemplo n.º 3
0
        public void WillProvideDefaultPropertyName()
        {
            var searchIndex = new EventIndexDefinition <CustomEventDtoD>();

            Assert.NotNull(searchIndex.Field("Sender"));
        }
Ejemplo n.º 4
0
        public void WillExcludeIgnoredFields()
        {
            var searchIndex = new EventIndexDefinition <CustomEventDtoC>();

            Assert.Null(searchIndex.Field("Sender"));
        }