public void Paths_Update_StatusCode_400(int status) { IPathRepository pathRepository = null; IPointRepository pointRepository = null; PathsController controller = new PathsController(pathRepository, pointRepository); Path path = new Path() { Destiny = new Point() { Name = "A" }, Origin = new Point() { Name = "B" } }; IActionResult actionResult = controller.PutPath(path.PathId, path); int?statusCode = ((BadRequestObjectResult)(actionResult.Should().Subject)).StatusCode; statusCode.Should().Be(status, $"StatusCode should be {status}"); }
public RoutesController(IPathRepository pathRepository, IPointRepository pointRepository, IRouteRepository routeRepository) { _pathRepository = pathRepository; _pointRepository = pointRepository; _routeRepository = routeRepository; _routes = BuildRutes(); }
public TreeUtilities(IHebrewLetterRepository hebrewLetterRepository, ISephiraRepository sephiraRepository, IPlanetRepository planetRepository, IZodiacSignRepository zodiacSignRepository, IPathRepository pathRepository, ITreeOfLifeDatabase database) { _hebrewLetterRepository = hebrewLetterRepository; _sephiraRepository = sephiraRepository; _planetRepository = planetRepository; _zodiacSignRepository = zodiacSignRepository; _pathRepository = pathRepository; _database = database; }
public Tree(IHebrewLetterRepository hebrewLetterRepository, ISephiraRepository sephiraRepository, IPlanetRepository planetRepository, IZodiacSignRepository zodiacSignRepository, IPathRepository pathRepository, IElementRepository elementRepository, IMetalRepository metalRepository) { Paths = pathRepository.ReadAll(); Sephiroth = sephiraRepository.ReadAll(); HebrewLetters = hebrewLetterRepository.ReadAll(); Planets = planetRepository.ReadAll(); ZodiacSigns = zodiacSignRepository.ReadAll(); Elements = elementRepository.ReadAll(); Metals = metalRepository.ReadAll(); }
public void Paths_Get_Id_StatusCode_400(int status) { IPathRepository pathRepository = null; IPointRepository pointRepository = null; PathsController controller = new PathsController(pathRepository, pointRepository); IActionResult result = controller.GetPath(1); int?statusCode = ((ObjectResult)(result.Should().Subject)).StatusCode; statusCode.Should().Be(status, $"StatusCode should be {status}"); }
public RoutesControllerTests() { ServiceProvider serviceProvider = CreateServiceProvider(); IServiceProvider service = serviceProvider.GetService <IServiceProvider>(); _context = service.GetRequiredService <DeliveryServiceContext>(); _pathRepository = new PathRepository(_context) as IPathRepository; _pointRepository = new PointRepository(_context) as IPointRepository; _routeRepository = new RouteRepository(_context) as IRouteRepository; DatabaseInitializer.Seed(service); }
public ColonelController( IColonelRepository colonelRepository, IColonelManagementRepository colonelManagementRepository, IColonelGradeRepository colonelGradeRepository, IGroupPurchaseRepository groupPurchaseRepository, IPathRepository pathRepository, IBrokerageRepository brokerageRepository ) { _colonelRepository = colonelRepository; _colonelManagementRepository = colonelManagementRepository; _colonelGradeRepository = colonelGradeRepository; _groupPurchaseRepository = groupPurchaseRepository; _pathRepository = pathRepository; _brokerageRepository = brokerageRepository; }
public void Paths_Add_StatusCode_400(int status) { IPathRepository pathRepository = null; IPointRepository pointRepository = null; PathsController controller = new PathsController(pathRepository, pointRepository); Path path = new Path() { DestinyId = 1, OriginId = 2 }; IActionResult result = controller.PostPath(path); int?statusCode = ((ObjectResult)(result.Should().Subject)).StatusCode; statusCode.Should().Be(status, $"StatusCode should be {status}"); }
public PathsController(IPathRepository pathRepository, IPointRepository pointRepository) { _pathRepository = pathRepository; _pointRepository = pointRepository; }
public CourseRepository(IPathRepository pathRepository) { _pathRepository = pathRepository; }
public PathService(IPathRepository pathRepository) { _pathRepository = pathRepository; }
public PathService(IMapper mapper, IPathRepository pathRepository) { _pathRepository = pathRepository; _mapper = mapper; }
public LogisticCenterHandler(IPathRepository pathRepository, ILogisticCenterRepository logisticCenterRepository) { _pathRepository = pathRepository; _logisticCenterRepository = logisticCenterRepository; }
static PathController() { Kernel = new StandardKernel(new LogicModule(), new DataModule()); PathRepository = Kernel.Get<IPathRepository>(); }
public PathsController(ILogger <PathsController> logger, IPathRepository pathRepository) { _logger = logger; _pathRepository = pathRepository; }
public DeploymentService() { this.pathRepository = Factory.GetInstance <IPathRepository>(); this.backupRepository = Factory.GetInstance <IBackupRepository>(); this.packageRepositoryFactory = Factory.GetInstance <IPackageRepositoryFactory>(); }
static void Main(string[] args) { ObjectFactoryConfigurator.Configure(); IPathRepository pathRepository = Factory.GetInstance <IPathRepository>(); IBackupRepository backupRepository = Factory.GetInstance <IBackupRepository>(); /* IBackupRepository backupRepository = Factory.GetInstance<IBackupRepository>(); * * backupRepository.RestoreDirectory(Guid.Parse("4487e739-5d2c-44b2-bf2a-a01692b60de0")); * * Guid storeDirectory = backupRepository.StoreFile(@"H:\AspNetDeploySatelliteWorkingFolder\TestFolder\Project15\Web.config"); * * Console.WriteLine("STORED = " + storeDirectory); * Console.ReadKey(); * * backupRepository.RestoreFile(storeDirectory); * * Console.WriteLine("RESTORED"); * Console.ReadKey(); */ /*ConfigOperation configOperation = new ConfigOperation(backupRepository); * * configOperation.Configure(JsonConvert.DeserializeObject(@" * { * file : 'H:\\AspNetDeploySatelliteWorkingFolder\\TestFolder\\Project15\\Web.config', * content : ' * <configuration> * <system.web> * <compilation debug=""false"" /> * </system.web> * <appSettings childNodesKeyName=""key""> * <add key=""Site.Version"" value=""1.2"" /> * <add key=""BackgroundCMS.TargetAuthorizeUrl"" value=""{var:BackgroundCMS.TargetAuthorizeUrl}"" /> * </appSettings> * </configuration> * ' * }"), new Dictionary<string, object> * { * {"BackgroundCMS.TargetAuthorizeUrl", "http://omg.ru"} * });*/ UpdateHostsOperation operation = new UpdateHostsOperation(backupRepository); operation.Configure(JsonConvert.DeserializeObject(@" { add : [ {ip: '127.0.0.1', domain: 'testing-1.local'}, {ip: '127.0.0.2', domain: 'testing-2.local'} ] }")); operation.Run(); Console.WriteLine("UPDATED"); Console.ReadKey(); operation.Rollback(); Console.WriteLine("REVERTED"); Console.ReadKey(); /*WebSiteOperation webSiteOperation = new WebSiteOperation(backupRepository, new PackageRepository(pathRepository.GetPackagePath(6))); * * * webSiteOperation.Configure(JsonConvert.DeserializeObject(@" * { * destination : 'H:\\AspNetDeploySatelliteWorkingFolder\\TestFolder\\Project15', * siteName : 'Project 15', * applicationPoolName : 'Project 15', * projectId : 15, * bindings : [ * * { * port : 80, * protocol : 'http', * url : 'project15.local' * } * ] * }")); * * webSiteOperation.Run(); * webSiteOperation.Rollback();*/ /*if (Directory.Exists(@"H:\AspNetDeploySatelliteWorkingFolder\TestFolder")) * { * Directory.Delete(@"H:\AspNetDeploySatelliteWorkingFolder\TestFolder", true); * Directory.CreateDirectory(@"H:\AspNetDeploySatelliteWorkingFolder\TestFolder"); * } */ /*IPathRepository pathRepository = Factory.GetInstance<IPathRepository>();*/ /*PackageRepository packageRepository = new PackageRepository(pathRepository.GetPackagePath(6)); * packageRepository.ExtractProject(15, @"H:\AspNetDeploySatelliteWorkingFolder\TestFolder\Project15"); * packageRepository.ExtractProject(19, @"H:\AspNetDeploySatelliteWorkingFolder\TestFolder\Project19"); */ Console.WriteLine("Complete"); Console.ReadKey(); }
public PathLogic(IUnitOfWork unit, IPathRepository repo) { this.Unit = unit; this.Repo = repo; }