示例#1
0
        public void TestJsonSerializeWithNullValues()
        {
            var expectedJson        = "{}";
            var customerInformation = CustomerInformationBuilder.MakeCustomerInformationWithoutOptionals();
            var actualJson          = JsonHelper.Serialize(customerInformation, "dd-MM-yyyy");

            Assert.AreEqual(expectedJson, actualJson);
        }
示例#2
0
        public void TestJsonSerialize()
        {
            var expectedJson        = "{\"emailAddress\":\"[email protected]\",\"dateOfBirth\":\"20-03-1987\",\"gender\":\"M\",\"initials\":\"J.M.\",\"telephoneNumber\":\"0204971111\"}";
            var customerInformation = CustomerInformationBuilder.MakeCompleteCustomerInformation();
            var actualJson          = JsonHelper.Serialize(customerInformation, "dd-MM-yyyy");

            Assert.AreEqual(expectedJson, actualJson);
        }
示例#3
0
        public void TestSignatureData()
        {
            var expectedSignatureData = new List <string> {
                "*****@*****.**", "20-03-1987", "M", "J.M.", "0204971111"
            };
            var customerInformation = CustomerInformationBuilder.MakeCompleteCustomerInformation();
            var actualSignatureData = customerInformation.GetSignatureData();

            CollectionAssert.AreEqual(expectedSignatureData, actualSignatureData);
        }
示例#4
0
        public void TestSignatureDataWithNullValues()
        {
            var expectedSignatureData = new List <string> {
                null, null, null, null, null
            };
            var address             = CustomerInformationBuilder.MakeCustomerInformationWithoutOptionals();
            var actualSignatureData = address.GetSignatureData();

            CollectionAssert.AreEqual(expectedSignatureData, actualSignatureData);
        }
示例#5
0
        public void TestConstruction()
        {
            var customerInformation = CustomerInformationBuilder.MakeCompleteCustomerInformation();

            Assert.AreEqual("*****@*****.**", customerInformation.EmailAddress);
            Assert.AreEqual("20-03-1987", customerInformation.DateOfBirthRaw);
            Assert.AreEqual("M", customerInformation.Gender);
            Assert.AreEqual("J.M.", customerInformation.Initials);
            Assert.AreEqual("0204971111", customerInformation.TelephoneNumber);
        }