public void IsItCorrectResultOfRegex() { CheckWeb web = new CheckWeb(); string actual = web.CreateRightAddress("vk", "ru"); StringAssert.Matches(actual, new Regex(@"^http(s)?://([\w-]+.)+[\w-]+(/[\w- ./?%&=])?$")); }
public void IsItStartRight() { CheckWeb web = new CheckWeb(); string actual = web.CreateRightAddress("vk", "ru"); StringAssert.StartsWith(actual, "http"); }
public void IsItContainAddress() { CheckWeb web = new CheckWeb(); string actual = web.CreateRightAddress("vk", "ru"); StringAssert.Contains(actual, "http://"); }
public void IsItMinNotNull() { CheckWeb web = new CheckWeb(); var actual = web.Min(2, 4, 7); Console.WriteLine(actual); Assert.IsNotNull(actual); }
public void Check_ReturnRightAddress() { string str = "http:/google.com"; bool expected = false; CheckWeb check = new CheckWeb(); check.Check(str); }
public void IsItMinOrNull() { CheckWeb web = new CheckWeb(); //var actual = web.Min(2,4,7); string actual = null; Console.WriteLine(actual); Assert.IsNull(actual); }
public void CreateRightAddress() { CheckWeb web = new CheckWeb(); bool trexpect = true; bool flexpect = false; string actual = web.CreateRightAddress("vk", "ru"); bool actualBool = web.Check(actual); Assert.AreEqual(trexpect, actualBool); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { labhost.Text = GetWebUrl(); if (CheckWeb.Check()) { Response.Redirect("http://" + HttpContext.Current.Request.Url.Host.ToString()); } } }
public void AddressReturnTrue() { string str = "http://google.com"; bool trexpect = true; bool flexpect = false; CheckWeb web = new CheckWeb(); bool actual = web.Check(str); Assert.AreEqual(trexpect, actual); }