Exemple #1
0
        public void RegisteredDetailsTest()
        {
            slave = new GetUserDetailsSlave(registered);
            slave.GetUserDetails();
            var expectedDetails = new[] { "Moshe", "Here 3", "12345678" };
            var actual          = slave.Answer.ReportList;

            Assert.AreEqual(expectedDetails.Length, actual.Length);
            for (int i = 0; i < expectedDetails.Length; i++)
            {
                Assert.AreEqual(expectedDetails[i], actual[i]);
            }
        }
Exemple #2
0
        public void GuestDetailsTest()
        {
            slave = new GetUserDetailsSlave(guest);
            slave.GetUserDetails();
            var actual          = slave.Answer.ReportList;
            var expectedDetails = new string[] { null, null, null };

            Assert.AreEqual(expectedDetails.Length, actual.Length);
            for (int i = 0; i < expectedDetails.Length; i++)
            {
                Assert.AreEqual(expectedDetails[i], actual[i]);
            }
        }
Exemple #3
0
 public void DidntEnterTest()
 {
     slave = new GetUserDetailsSlave(null);
     slave.GetUserDetails();
     Assert.IsNull(slave.Answer.ReportList);
 }