public void DropCreateNewDatabase()
 {
     using (SoundboardServiceContext context =
         new SoundboardServiceContext(
             SoundboardServiceContext.DBCreationMethod.DropCreateAlways))
     {
         Channel globalChannel = context.Channels
             .FirstOrDefault(channel => channel.Name == "Global");
         Assert.IsNotNull(globalChannel);
     }
 }
Ejemplo n.º 2
0
 public void DisallowNullNames()
 {
     using (SoundboardServiceContext context =
         new SoundboardServiceContext())
     {
         Channel nullNameChannel = new Channel()
         {
             Name = null
         };
         context.Channels.Add(nullNameChannel);
         context.SaveChanges();
     }
 }