Example #1
0
        public void TestMethod1()
        {
            ComposerService.RegisterObjectMapper(new AutomobileDbModelToClientDto <AutomobileDto, AutomobileDbModel>());

            AutomobileDto dto = new AutomobileDto
            {
                Color = "red",
                NumberOfPassengers = 4
            };

            var model = ComposerService.Composer.Compose <AutomobileDto, AutomobileDbModel>(dto);

            //Assert.IsFalse(false, "1 should not be prime");
            Assert.IsTrue(true, "yaaaaay!!");
        }
Example #2
0
        public async Task ApplyAsync_Query_Should_Call_Composer_ToQuery_When_Invoked()
        {
            // Arrange
            var query = "MOCK-QUERY";

            ComposerService.Setup(x => x.ToQuery(It.IsAny <SearchModel>()));
            ScriptService.Setup(x =>
                                x.EvaluateAsync <Func <object, bool> >(It.IsAny <string>(), null, null, default(CancellationToken)))
            .ReturnsAsync(obj => obj != null);

            // Act
            var sut = CreateSut();
            await sut.ApplyAsync(query, new List <object>());

            // Assert
            ComposerService.Verify(x => x.ToQuery(It.IsAny <SearchModel>()), Times.Once);
        }
 public void SetUpFixture()
 {
     _composerService = new ComposerService(ComposerRepositoryMock.GetMock().Object);
 }
Example #4
0
        public void TestMethod1()
        {
            ComposerService.RegisterObjectMapper(new AutomobileDbModelToClientDto <AutomobileDto, AutomobileDbModel>());

            Assert.IsFalse(true, "1 should not be prime");
        }
Example #5
0
 public ComposersController(DbEntitiesContext context)
 {
     composerService = new ComposerService(context);
 }
Example #6
0
 public ComposersController()
 {
     composerService = new ComposerService(new DbEntitiesContext());
 }
 public void Setup()
 {
     _composerService = new ComposerService();
 }