Browse Source

Fix build errors after PR merges.

pull/2483/head
Halil İbrahim Kalkan 7 years ago
parent
commit
2bda094fcf
  1. 18
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs
  2. 29
      framework/test/Volo.Abp.FluentValidation.Tests/Volo/Abp/FluentValidation/ApplicationService_FluentValidation_Tests.cs

18
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs

@ -1,9 +1,7 @@
using System.Diagnostics;
using System.Text;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Logging;
using Volo.Abp.Auditing;
using Volo.Abp.Http;
using Volo.Abp.Json;
@ -39,18 +37,12 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
{
var script = CreateAbpExtendScript(await _configurationAppService.GetAsync());
return Content(_options.MinifyGeneratedScript == true ? _javascriptMinifier.Minify(script) : script,
return Content(
_options.MinifyGeneratedScript == true
? _javascriptMinifier.Minify(script)
: script,
MimeTypes.Application.Javascript
Logger.LogDebug("Executing AbpApplicationConfigurationScriptController.Get()");
var result = CreateAbpExtendScript(
await _configurationAppService.GetAsync()
);
Logger.LogDebug("Executed AbpApplicationConfigurationScriptController.Get()");
return Content(result, MimeTypes.Application.Javascript);
}
private string CreateAbpExtendScript(ApplicationConfigurationDto config)

29
framework/test/Volo.Abp.FluentValidation.Tests/Volo/Abp/FluentValidation/ApplicationService_FluentValidation_Tests.cs

@ -49,18 +49,23 @@ namespace Volo.Abp.FluentValidation
{
// MyStringValue should be aaa, MyStringValue2 should be bbb. MyStringValue3 should be ccc
var exception = Assert.Throws<AbpValidationException>(() => _myAppService.MyMethod(new MyMethodInput
{
MyStringValue = "a",
MyMethodInput2 = new MyMethodInput2
{
MyStringValue2 = "b"
},
MyMethodInput3 = new MyMethodInput3
{
MyStringValue3 = "c"
}
}));
var exception = await Assert.ThrowsAsync<AbpValidationException>(
async () => await _myAppService.MyMethodAsync(
new MyMethodInput
{
MyStringValue = "a",
MyMethodInput2 = new MyMethodInput2
{
MyStringValue2 = "b"
},
MyMethodInput3 = new MyMethodInput3
{
MyStringValue3 = "c"
}
}
)
);
exception.ValidationErrors.ShouldContain(x => x.MemberNames.Contains("MyStringValue"));
exception.ValidationErrors.ShouldContain(x => x.MemberNames.Contains("MyMethodInput2.MyStringValue2"));
exception.ValidationErrors.ShouldContain(x => x.MemberNames.Contains("MyMethodInput3.MyStringValue3"));

Loading…
Cancel
Save