예제 #1
0
        public void GivenPagingThenThePagingPropertyIsSetToMatch()
        {
            var expected = new Paging();
            var query    = new SerializablePaginatedQuery(expected);

            Assert.Equal(expected, query.Paging);
        }
        public void GivenAnInstanceThenAllPropertiesAreSerialized()
        {
            var query = new SerializablePaginatedQuery(new Paging());
            SerializablePaginatedQuery deserialized = query.Clone();

            Assert.Equal(query, deserialized);
            Assert.NotSame(query, deserialized);
            Assert.Equal(query.GetHashCode(), deserialized.GetHashCode());
        }
예제 #3
0
        public void GivenAContextAndPagingThenThePagingPropertyIsSetToMatch()
        {
            var paging  = new Paging();
            var context = new SerializableMessage();
            var query   = new SerializablePaginatedQuery(context, paging);

            Assert.Equal(context.CorrelationId, query.CorrelationId);
            Assert.Equal(context.Id, query.CausationId);
            Assert.Equal(paging, query.Paging);
        }