示例#1
0
        public void TestPhotoParser()
        {
            uut = new PhotoParser();

            var testPhoto = new PhotoToServer
            {
                Bytes = new byte[1234],
                Pin   = "testpin"
            };

            var parsed = uut.ParsedData(testPhoto);
            var c      = new TestContains(parsed.Contains);

            Assert.That(c("pictureString") && c(Convert.ToBase64String(new byte[1234])) &&
                        c("eventPin") && c("testpin"));
        }
示例#2
0
        public void TestGuestParser()
        {
            uut = new GuestParser();

            var testGuest = new Guest
            {
                Pin      = "testpin",
                Username = "******"
            };

            var parsed = uut.ParsedData(testGuest);
            var c      = new TestContains(parsed.Contains);

            Assert.That(c("Pin") && c("testpin") &&
                        c("Name") && c("testusername"));
        }
示例#3
0
        public void TestHostParser()
        {
            uut = new HostParser();

            var testHost = new Host
            {
                Password = "******",
                Email    = "testemail",
                Name     = "testname"
            };

            var parsed = uut.ParsedData(testHost);
            var c      = new TestContains(parsed.Contains);

            Assert.That(c("Password") && c("testpassword") &&
                        c("UserName") && c("testemail"));
        }
示例#4
0
        public void TestNewHostParser()
        {
            uut = new NewHostParser();

            Host testHost = new Host
            {
                Email    = "testmail",
                Name     = "testname",
                Password = "******"
            };

            var output = uut.ParsedData(testHost);
            var c      = new TestContains(output.Contains);

            Assert.That(c("Email") && c("testmail") &&
                        c("Name") && c("testname") &&
                        c("Password") && c("testpassword"));
        }
示例#5
0
        public void TestNewEventParser()
        {
            uut = new NewEventParser();

            var testEvent = new EventModel
            {
                Description = "testdescription",
                EndDate     = DateTime.MinValue,
                Location    = "testlocation",
                Name        = "testname",
                StartDate   = DateTime.MinValue
            };


            var parsed = uut.ParsedData(testEvent);
            var c      = new TestContains(parsed.Contains);

            Assert.That(c("Description") && c("testdescription") &&
                        c("EndDate") && c(DateTime.MinValue.ToString("yyyy-MM-ddTHH:mm:ss")) &&
                        c("StartDate") && c(DateTime.MinValue.ToString("yyyy-MM-ddTHH:mm:ss")) &&
                        c("Location") && c("testlocation") &&
                        c("Name") && c("testname"));
        }