public BaseHandlerIntegrationTest() { var _applicationConfiguration = new ApplicationConfiguration(); var configurationRoot = TestHelper.GetConfigurationRoot(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); configurationRoot.Bind(_applicationConfiguration); var consoleWriter = new ConsoleWriter(SerilogFixture.UsefullLogger <ConsoleWriter>()); var authTokenFactory = new OAuthTokenFactory(SerilogFixture.UsefullLogger <OAuthTokenFactory>(), _applicationConfiguration); var clientFactory = new ClientProxyFactory(SerilogFixture.UsefullLogger <ClientProxyFactory>(), authTokenFactory, _applicationConfiguration); //var fileHandler = new FileHandlerMock() {ReadFile = FileHandlerMock.WithReadFileAsNoOp(), WriteFile = FileHandlerMock.WithWriteFileAsNoOp()}.Build(); var fileHandler = new FileHandler(SerilogFixture.UsefullLogger <FileHandler>()); SchemaClient = clientFactory.GetClientProxy <ISquidexAppSchemaClient>("aut-developer"); SchemaImportSystemUnderTest = new SchemaImportHandler(SerilogFixture.UsefullLogger <SchemaImportHandler>(), clientFactory, consoleWriter, null); SchemaExportSystemUnderTest = new SchemaExportHandler(SerilogFixture.UsefullLogger <SchemaExportHandler>(), clientFactory, consoleWriter, null); SchemaDeleteSystemUnderTest = new SchemaDeleteHandler(SerilogFixture.UsefullLogger <SchemaDeleteHandler>(), clientFactory, consoleWriter, null); SchemaListSystemUnderTest = new SchemaListHandler(SerilogFixture.UsefullLogger <SchemaListHandler>(), clientFactory, consoleWriter, null); //var schemaTagHandler = new SchemaTagHandler(SerilogFixture.UsefullLogger<ContentDeleteSystemUnderTest>(), clientFactory, null); ContentClient = clientFactory.GetClientProxy <ISquidexContentClient>("aut-developer"); ContentImportSystemUnderTest = new ContentImportHandler(SerilogFixture.UsefullLogger <ContentImportHandler>(), clientFactory, consoleWriter, null); ContentExportSystemUnderTest = new ContentExportHandler(SerilogFixture.UsefullLogger <ContentExportHandler>(), clientFactory, consoleWriter, null); ContentDeleteSystemUnderTest = new ContentDeleteHandler(SerilogFixture.UsefullLogger <ContentDeleteHandler>(), clientFactory, consoleWriter, null); ContentPostSystemUnderTest = new ContentPostHandler(SerilogFixture.UsefullLogger <ContentImportHandler>(), clientFactory, consoleWriter, null); AttachmentClient = clientFactory.GetClientProxy <ISquidexAttachmentClient>("aut-developer"); AttachmentImportSystemUnderTest = new AssetImportHandler(SerilogFixture.UsefullLogger <AssetImportHandler>(), clientFactory, consoleWriter, null); AttachmentExportSystemUnderTest = new AssetExportHandler(SerilogFixture.UsefullLogger <AssetExportHandler>(), clientFactory, consoleWriter, null); AttachmentDeleteSystemUnderTest = new AssetDeleteHandler(SerilogFixture.UsefullLogger <AssetDeleteHandler>(), clientFactory, consoleWriter, null); AttachmentListSystemUnderTest = new AssetListHandler(SerilogFixture.UsefullLogger <AssetListHandler>(), clientFactory, consoleWriter, null); AttachmentTagSystemUnderTest = new AssetTagHandler(SerilogFixture.UsefullLogger <AssetTagHandler>(), clientFactory, consoleWriter, null); AssetUpdateContentSystemUnderTest = new AssetUpdateContentHandler(SerilogFixture.UsefullLogger <AssetUpdateContentHandler>(), clientFactory, consoleWriter, null); }
public static async Task <Unit> ListAsset(AssetListHandler systemUnderTest, string application, string aliasCredentials = "aut-developer") { return(await systemUnderTest.Handle(new AssetListRequest() { AliasCredentials = aliasCredentials, Application = application }, CancellationToken.None)); }