|
@@ -0,0 +1,99 @@
|
|
|
+
|
|
|
+using FoodLogProject;
|
|
|
+namespace TestProject2
|
|
|
+{
|
|
|
+ [TestClass]
|
|
|
+ public class UnitTest1
|
|
|
+ {
|
|
|
+ [TestMethod]
|
|
|
+ public void UserNumber_AreNotEqual()
|
|
|
+ {
|
|
|
+ bool except = true;
|
|
|
+ GaruaevContext garuaevContext = new GaruaevContext();
|
|
|
+ bool actual = garuaevContext.CheckRegNumber("89524544428");
|
|
|
+ Assert.AreNotEqual(except,actual);
|
|
|
+ }
|
|
|
+
|
|
|
+ [TestMethod]
|
|
|
+ public void UserNumber_AreEqual()
|
|
|
+ {
|
|
|
+ bool except = false;
|
|
|
+ GaruaevContext garuaevContext = new GaruaevContext();
|
|
|
+ bool actual = garuaevContext.CheckRegNumber("+79524544428");
|
|
|
+ Assert.AreEqual(except, actual);
|
|
|
+ }
|
|
|
+
|
|
|
+ [TestMethod]
|
|
|
+ public void UserName_AreEqual()
|
|
|
+ {
|
|
|
+ bool except = true;
|
|
|
+ GaruaevContext garuaevContext = new GaruaevContext();
|
|
|
+ bool actual = garuaevContext.CheckRegName("Ñåìåí");
|
|
|
+ Assert.AreEqual(except, actual);
|
|
|
+ }
|
|
|
+
|
|
|
+ [TestMethod]
|
|
|
+ public void UserName_AreNotEqual()
|
|
|
+ {
|
|
|
+ bool except = true;
|
|
|
+ GaruaevContext garuaevContext = new GaruaevContext();
|
|
|
+ bool actual = garuaevContext.CheckRegName("ui12");
|
|
|
+ Assert.AreNotEqual(except, actual);
|
|
|
+ }
|
|
|
+
|
|
|
+ [TestMethod]
|
|
|
+ public void UserHeight_AreEqual()
|
|
|
+ {
|
|
|
+ bool except = true;
|
|
|
+ GaruaevContext garuaevContext = new GaruaevContext();
|
|
|
+ bool actual = garuaevContext.CheckRegHeight("80");
|
|
|
+ Assert.AreEqual(except, actual);
|
|
|
+ }
|
|
|
+
|
|
|
+ [TestMethod]
|
|
|
+ public void UserHeight_AreNotEqual()
|
|
|
+ {
|
|
|
+ bool except = true;
|
|
|
+ GaruaevContext garuaevContext = new GaruaevContext();
|
|
|
+ bool actual = garuaevContext.CheckRegHeight("ui12");
|
|
|
+ Assert.AreNotEqual(except, actual);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ [TestMethod]
|
|
|
+ public void UserWeight_AreEqual()
|
|
|
+ {
|
|
|
+ bool except = true;
|
|
|
+ GaruaevContext garuaevContext = new GaruaevContext();
|
|
|
+ bool actual = garuaevContext.CheckRegWeight("80");
|
|
|
+ Assert.AreEqual(except, actual);
|
|
|
+ }
|
|
|
+
|
|
|
+ [TestMethod]
|
|
|
+ public void UserWeight_AreNotEqual()
|
|
|
+ {
|
|
|
+ bool except = true;
|
|
|
+ GaruaevContext garuaevContext = new GaruaevContext();
|
|
|
+ bool actual = garuaevContext.CheckRegWeight("Simon");
|
|
|
+ Assert.AreNotEqual(except, actual);
|
|
|
+ }
|
|
|
+
|
|
|
+ [TestMethod]
|
|
|
+ public void UserPassword_AreEqual()
|
|
|
+ {
|
|
|
+ bool except = true;
|
|
|
+ GaruaevContext garuaevContext = new GaruaevContext();
|
|
|
+ bool actual = garuaevContext.CheckRegPassword("1010");
|
|
|
+ Assert.AreEqual(except, actual);
|
|
|
+ }
|
|
|
+
|
|
|
+ [TestMethod]
|
|
|
+ public void UserPassword_AreNotEqual()
|
|
|
+ {
|
|
|
+ bool except = true;
|
|
|
+ GaruaevContext garuaevContext = new GaruaevContext();
|
|
|
+ bool actual = garuaevContext.CheckRegPassword(" ");
|
|
|
+ Assert.AreNotEqual(except, actual);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|