예제 #1
0
        public async Task Query_FindWithInvalidChassi_Fails()
        {
            var context = GetInMemorySeededContext();
            var query   = new FindTruckQuery(context);

            var result = await query.ExecuteAsync("TEST");

            Assert.IsFalse(result.IsSuccess);
        }
예제 #2
0
        public async Task Query_FindWithValidChassi_ReturnTrucks()
        {
            var context = GetInMemorySeededContext();
            var query   = new FindTruckQuery(context);

            var result = await query.ExecuteAsync("TEST1");

            Assert.IsTrue(result.IsSuccess);
            Assert.AreEqual("TEST1", result.Content.Chassis);
        }