public SalaLogic() { Repo = new SalaRepository(); var salas = Repo.Obtener(); Sala = salas.First(); }
public void SalaRepositoryTestsTestSetUp() { BaseSqlTest.SeedDeleteDatabase(); BaseSqlTest.SeedInsertDatabase(); _salaRepository = new SalaRepository(); _salaDefault = SalaObjectMother.Default; }
static void Main() { var salas = new SalaRepository().Obtener(); Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new UI.EditarSala(new Logic.SalaLogic(salas.First()))); }
public void Deve_informar_que_nao_existem_salas_disponiveis() { var salas = new List <Sala>(); var salaRepository = new SalaRepository(salas); var salaService = new SalaService(salaRepository); var exception = Assert.Throws <ChatException>(() => salaService.Obter()); Assert.Equal("Desculpe, não existem salas disponiveis.", exception.Message); }
public AdicionarParticipanteTest() { var sala = new Sala("Sala1"); var salas = new List <Sala> { sala }; var salaReposioty = new SalaRepository(salas); _salaService = new SalaService(salaReposioty); }
public EnviarMensagemPublicaTest() { var sala = new Sala("Sala1"); var salas = new List <Sala> { sala }; var salaReposioty = new SalaRepository(salas); _salaService = new SalaService(salaReposioty); _salaService.AdicionarParticipante("Sala1", "Pedro"); }
public ObterMensagensDoParticipanteTest() { var sala = new Sala("Sala1"); sala.AdicionarParticipante("Maria"); sala.EnviarMensagemPublica("Bom dia pessoal", "Maria"); var salas = new List <Sala> { sala }; var salaReposioty = new SalaRepository(salas); _salaService = new SalaService(salaReposioty); }
public void Deve_obter_as_salas_disponiveis() { var salas = new List <Sala> { new Sala("Sala1"), new Sala("Sala2") }; var salaRepository = new SalaRepository(salas); var salaService = new SalaService(salaRepository); var salasEncontradas = salaService.Obter(); Assert.Equal(2, salasEncontradas.Count); Assert.Contains(salasEncontradas, x => x.Nome == "Sala1"); Assert.Contains(salasEncontradas, x => x.Nome == "Sala2"); }
public EventoService() { repository = new EventoRepository(); salaRepository = new SalaRepository(); }
public SalaLogic(Sala sala) { Repo = new SalaRepository(); Sala = sala; }
public SalaRepositoryTest() { PegaContexto(); _salaRepo = new SalaRepository(meuContexto); }
public SalaRepositoryTest() { _salaRepo = new SalaRepository(meuContexto); }
public List <Sala> Get() { var teste = new SalaRepository().GetAll().ToList();//.ToList(); return(teste); }
public SalaService() { repository = new SalaRepository(); }