???RazorGenerator?????View???е??????
???????????? ???????[ 2016/6/13 10:52:48 ] ??????????????? ??????? RazorGenerator
????5????Web????????????????
using System;
using System.Linq;
using System.Web.Mvc;
using HtmlAgilityPack;
using NUnit.Framework;
using RazorGenerator.Testing;
namespace WebApplication1.Tests.Views.Shared
{
[TestFixture]
public class ErrorTest1
{
[Test]
public void TestMethod1()
{
AssertHtml<ASP._Views_Shared_Error_cshtml?? HandleErrorInfo>("content"??
@"<h1 class=""text-danger"">Error.</h1>
<h2 class=""text-danger"">An error occurred while processing your request.</h2>");
}
public static HtmlDocument Render<TView??TModel>()
where TView : WebViewPage<TModel>?? new()
{
TView view1 = new TView();
WebViewPage<TModel> view = view1 as WebViewPage<TModel>;
HtmlDocument doc = view.RenderAsHtml();
Assert.IsEmpty(doc.ParseErrors.Where(x => x.Code != HtmlParseErrorCode.EndTagNotRequired));
return doc;
}
public static void AssertHtml<TView?? TModel>(string containerId?? string expected?? bool collapsed = false)
where TView : WebViewPage<TModel>?? new()
{
HtmlDocument doc = Render<TView??TModel>();
expected = expected.Replace(" "?? " ");
string actual = doc.GetElementbyId(containerId).InnerHtml.Trim().Replace(" "?? " ");
Assert.AreEqual(expected?? actual);
}
}
}
????6?????в?????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
iOS???????mocha??chai??sinon??istanbul???????????????????????????????????????д?????Java????????7??????Android?????????Robolectric3.0????(?)???Kiwi?????????????????????????????????Python?????????????????????????????????????Controller????????д?????????10???????????????????Angular????????????Component??Directive??Pipe ???ServiceAndroid????????????????????????????????--Mockito??????iOS UnitTest???????Vue?????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????