Beispiel #1
0
        public void WillOutputCorrectly()
        {
            var indexDefinition = new Events_ByDate_Count
            {
                Conventions = new DocumentConvention()
            }.CreateIndexDefinition();

            Assert.Equal("docs.Events\r\n\t.Select(@event => new {Year = @event.Date.Year, Month = @event.Date.Month, Count = 1})", indexDefinition.Map);
        }
Beispiel #2
0
        public void WillOutputCorrectly()
        {
            var indexDefinition = new Events_ByDate_Count
            {
                Conventions = new DocumentConvention {
                    PrettifyGeneratedLinqExpressions = false
                }
            }.CreateIndexDefinition();

            Assert.Equal(@"docs.Events.Select(@event => new {
    Year = @event.Date.Year,
    Month = @event.Date.Month,
    Count = 1
})", indexDefinition.Map);
        }