Example #1
0
    public async void OriginalCodeShouldHaveSameOutputAsCompressed(CompressFunctionalTestData testData)
    {
        var htmlA = InjectScriptToRuntimeTemplate(testData.Name, testData.Input);
        await PageA.SetContentAsync(htmlA, _navigationOptions);

        foreach (var command in testData.Commands)
        {
            await PerformCommand(command, PageA);
        }
        await TaskA;

        Assert.Equal(testData.ExpectedStderr, string.Join("\n", StderrA));
        Assert.Equal(testData.ExpectedStdout, string.Join("\n", StdoutA));
        var minified = Optimize(testData.Input, _bobrilTestCompressOptions);
        var htmlB    = InjectScriptToRuntimeTemplate($"{testData.Name} - minified", minified);
        await PageB.SetContentAsync(htmlB, _navigationOptions);

        foreach (var command in testData.Commands)
        {
            await PerformCommand(command, PageB);
        }
        await TaskB;

        Assert.Equal(testData.ExpectedStderr, string.Join("\n", StderrB));
        Assert.Equal(testData.ExpectedStdout, string.Join("\n", StdoutB));
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     string info = PageA.GetStringInfo();
 }
Example #3
0
 public App()
 {
     InitializeComponent();
     MainPage = new PageA();
 }