Beispiel #1
0
        public void EntityFramework_When_Called_Creates_And_Returns_EntityFrameworkDestinationBuilder()
        {
            // Arrange
            ILogGroupDestinationsBuilder logGroupDestinationsBuilder = new Mock <ILogGroupDestinationsBuilder>().Object;

            // Act
            IEntityFrameworkDestinationBuilder destinationBuilderReturned = LogGroupDestinationsBuilderEntityFrameworkExtensions.EntityFramework(logGroupDestinationsBuilder);

            // Assert
            Assert.IsInstanceOf <EntityFrameworkDestinationBuilder>(destinationBuilderReturned);
            Assert.AreEqual(logGroupDestinationsBuilder, ((EntityFrameworkDestinationBuilder)destinationBuilderReturned).LogGroupDestinationsBuilder);
        }
 public static IEntityFrameworkDestinationBuilder WithLogModelDbEntity(this IEntityFrameworkDestinationBuilder self)
 {
     return(self.WithDbEntity(new LogDbModelEntityBuilder()));
 }
 public static IEntityFrameworkDestinationBuilder WithLogModelDbEntity(this IEntityFrameworkDestinationBuilder self, JsonSerializerSettings jsonSerializerSettings)
 {
     return(self.WithDbEntity(new LogDbModelEntityBuilder(jsonSerializerSettings)));
 }
 public static IEntityFrameworkDestinationBuilder WithDbEntity(this IEntityFrameworkDestinationBuilder self, LogModelFunc <Object> factoryMethod)
 {
     return(self.WithDbEntity(new FactoryMethodDbEntityBuilder(factoryMethod)));
 }
 public static IEntityFrameworkDestinationBuilder WithDbContext(this IEntityFrameworkDestinationBuilder self, LogModelFunc <DbContext> factoryMethod)
 {
     return(self.WithDbContext(new FactoryMethodDbContextProvider(factoryMethod)));
 }
 public static IEntityFrameworkDestinationBuilder WithDbContext(this IEntityFrameworkDestinationBuilder self, DbContext dbContext)
 {
     return(self.WithDbContext(new DbContextProvider(dbContext)));
 }