public SellHouseServiceTests() { mockSellHouseService = new Mock <SellHouseService>(houseRepository.Object, walletService.Object); mockSellHouseService.CallBase = true; SingletonInit.Init(); }
public CountryPresidentServiceTests() { mockCountryPresidentService = new Mock <CountryPresidentService>(countryRepository.Object, presidentVotingRepository.Object, regionRepository.Object); mockCountryPresidentService.CallBase = true; SingletonInit.Init(); }
public MPPServiceTests() { mppService = new Mock <MPPService>(countryService.Object, walletService.Object, warService.Object, mppOfferRepository.Object, transactionService.Object, warningService.Object, mppRepository.Object); mppService.CallBase = true; SingletonInit.Init(); }
public NewspaperServiceUnitTests() { newspaperService = new NewspaperService(Mock.Of <INewspaperRepository>(), Mock.Of <IEntityService>(), Mock.Of <IEntityRepository>() , Mock.Of <IArticleRepository>(), Mock.Of <IUploadService>(), Mock.Of <IWarningService>(), Mock.Of <ITransactionsService>(), Mock.Of <IWalletService>(), Mock.Of <IConfigurationRepository>(), Mock.Of <ICitizenService>()); SingletonInit.Init(); }
public HotelDayChangeProcessorTests() { mockProcessor = new Mock <HotelDayChangeProcessor>(equipmentService.Object, equipmentRepository.Object); mockProcessor.CallBase = true; SingletonInit.Init(); hotelDummyCreator = new HotelDummyCreator(); citizenDummyCreator = new CitizenDummyCreator(); }
public TradeServiceTests() { tradeService = new Mock <TradeService>(equipmentRepository.Object, transactionsService.Object, equipmentService.Object, walletService.Object, tradeRepository.Object, productService.Object, regionService.Object, embargoRepository.Object, warningService.Object, walletRepository.Object); tradeService.CallBase = true; equipmentService.Setup(x => x.GetUnusedInventorySpace(It.IsAny <Equipment>())).Returns(1000); SingletonInit.Init(); }
public WarServiceTests() { mockWarService = new Mock <WarService>(warRepository.Object, Mock.Of <Entities.Repository.IWalletRepository>(), Mock.Of <ICountryRepository>(), transactionService.Object, Mock.Of <IWarningService>(), Mock.Of <ICitizenRepository>(), Mock.Of <ICitizenService>(), Mock.Of <IPopupService>(), Mock.Of <IWalletService>(), Mock.Of <IBattleRepository>()); mockWarService.CallBase = true; transactionService.Setup(x => x.PayForResistanceBattle(It.IsAny <Citizen>(), It.IsAny <Region>(), It.IsAny <IWarService>())); SingletonInit.Init(); }
public TransactionServiceTests() { mockTransactionsService = new Mock <TransactionsService>(Mock.Of <ITransactionLogRepository>(), Mock.Of <IEntityRepository>(), Mock.Of <IWalletService>(), Mock.Of <IConfigurationRepository>()); mockTransactionsService.CallBase = true; mockTransactionsService.Setup(x => x.MakeTransaction(It.IsAny <Transaction>(), It.IsAny <bool>())) .Returns(TransactionResult.Success); SingletonInit.Init(); }
public CompanyServiceUnitTests() { mockCompanyService = new Mock <CompanyService>( Mock.Of <ICitizenService>(), Mock.Of <IConfigurationRepository>(), Mock.Of <IEquipmentRepository>(), Mock.Of <IProductService>(), Mock.Of <IProductRepository>(), Mock.Of <ICitizenRepository>(), Mock.Of <ITransactionsService>(), Mock.Of <IJobOfferService>(), Mock.Of <ICompanyEmployeeRepository>(), Mock.Of <ICompanyRepository>(), Mock.Of <IEntityService>(), Mock.Of <ICompanyManagerRepository>(), Mock.Of <IRegionRepository>(), warningService.Object, jobOfferRepository.Object, Mock.Of <IEquipmentService>(), Mock.Of <IContractService>(), Mock.Of <IWalletService>(), Mock.Of <IPopupService>(), Mock.Of <IRegionService>()); mockCompanyService.CallBase = true; SingletonInit.Init(); }
public MessageServiceTests() { SingletonInit.Init(); ICollection <Entity> recipients = new List <Entity>() { new Entity() { EntityID = 2 }, new Entity() { EntityID = 3 }, new Entity() { EntityID = 4 } }; messageRepository.Setup(x => x.Where(It.IsAny <Expression <Func <MessageThread, bool> > >())).Returns <Expression <Func <MessageThread, bool> > > (r => new List <MessageThread>() { new MessageThread() { ID = 1, Recipients = recipients }, new MessageThread() { ID = 2, Recipients = recipients } }.AsQueryable() ); entityRepository.Setup(x => x.GetById(It.Is <int>(num => num == 5))).Returns <int>(id => new Entity() { EntityID = 5 }); entityRepository.Setup(x => x.GetById(It.Is <int>(num => num == 2))).Returns <int>(id => new Entity() { EntityID = 2 }); entityRepository.Setup(x => x.GetById(It.Is <int>(num => num == 1))).Returns <int>(id => new Entity() { EntityID = 1 }); messageService = new MessageService(messageRepository.Object, entityRepository.Object); }
public CountryServiceTests() { entityService = new EntityService(entityRepository.Object, Mock.Of <IReservedEntityNameRepository>()); mockCountryService = new Mock <CountryService>(countryRepository.Object, entityRepository.Object, entityService, presidentVotingRepository.Object, congressCandidateVotingRepository.Object, citizenRepository.Object, Mock.Of <ICitizenService>(), Mock.Of <ICountryPresidentService>(), Mock.Of <ICongressVotingService>(), Mock.Of <IWalletService>()); presidentVotingRepository.Setup(x => x.GetCandidateByID(It.IsAny <int>())) .Returns <int>(id => candidates.First(c => c.ID == id)); SingletonInit.Init(); }
public BattleServiceTests() { SingletonInit.Init(); mockBattleService = new Mock <BattleService>(battleRepository.Object, regionRepository.Object, warService.Object, equipmentRepository.Object, warningService.Object, countryRepository.Object, transactionService.Object, regionService.Object, Mock.Of <IWarRepository>(), Mock.Of <ICitizenRepository>(), Mock.Of <ICitizenService>(), Mock.Of <IEntityRepository>()); mockBattleService.CallBase = true; regionService.Setup(x => x.GetPathBetweenRegions(It.IsAny <Region>(), It.IsAny <Region>())) .Returns(new Path() { Distance = 100 }); }
public MarketServiceTests() { marketService = new MarketService(equipmentRepository.Object, marketOfferRepository.Object, companyRepository.Object, regionService.Object, entityRepository.Object, transactionService.Object, walletService.Object, productTaxRepository.Object, productService.Object, Mock.Of <IEmbargoRepository>(), Mock.Of <ICountryRepository>(), Mock.Of <IEquipmentService>(), Mock.Of <ICompanyFinanceSummaryService>()); productService.Setup(x => x.GetAllTaxesForProduct(It.IsAny <int>(), It.IsAny <int?>(), It.IsAny <int?>())) .Returns(new ProductAllTaxes(new List <ProductTax>()) { VAT = 0m }); SingletonInit.Init(); }
public EquipmentTests() { SingletonInit.Init(); }
public ShoutBoxServiceTests() { shoutBoxService = new ShoutBoxService(shoutboxMessageRepository.Object, Mock.Of <ICountryRepository>(), Mock.Of <IShoutboxChannelRepository>(), Mock.Of <IConfigurationRepository>()); SingletonInit.Init(); }
public FriendServiceTests() { SingletonInit.Init(); friendService = new FriendService(friendRepository.Object, warningService.Object, popupService.Object); }
public EmbargoServiceTests() { embargoService = new EmbargoService(Mock.Of <ICountryRepository>(), embargoRepository.Object, Mock.Of <IWarningService>(), Mock.Of <Entities.Repository.IWalletRepository>(), Mock.Of <ITransactionsService>()); SingletonInit.Init(); }
public HotelServiceTests() { mockHotelService = new Mock <HotelService>(Mock.Of <IEntityService>(), Mock.Of <IEntityRepository>()); mockHotelService.CallBase = true; SingletonInit.Init(); }
public CompanyFinanceSummaryServiceTests() { mockCompanyFinanceSummaryService = new Mock <CompanyFinanceSummaryService>(companyFinanceSummaryRepository.Object); SingletonInit.Init(); }
public CitizenTraderTests() { SingletonInit.Init(); offerCreator = new MarketOfferDummyCreator(); }
public FriendRepositoryTests() { SingletonInit.Init(); }
public DefenseSystemServiceTests() { mockDefenseSystemService = new Mock <DefenseSystemService>(walletService.Object, constructionRepository.Object, transactionScopeProvider.Object); SingletonInit.Init(); }