コード例 #1
0
        public void GivenParcelTotalPriceIsBelow20Euro_ThenIsNotEntitledToFreeShipment(
            decimal parcelTotalPrice)
        {
            var postalService            = new PostalService();
            var isEntitledToFreeShipment = postalService.IsFreeShipment(parcelTotalPrice);

            Check.That(isEntitledToFreeShipment).IsFalse();
        }
コード例 #2
0
        public void GivenParcelTotalPriceIsEqualOrAbove20Euro_ThenIsEntitledToFreeShipment(
            decimal parcelTotalPrice)
        {
            var postalService            = new PostalService();
            var isEntitledToFreeShipment = postalService.IsFreeShipment(parcelTotalPrice);

            Check.That(isEntitledToFreeShipment).IsTrue();
        }
コード例 #3
0
        public void firstName_should_create_new_firstname_from_resource_file()
        {
            var name = Name.Firstname();

            var nameExistOnResourceFile = Resources.Name.Firstname.Contains(name);

            Check.That(Regex.IsMatch(name, @"\w")).IsTrue();
            Check.That(nameExistOnResourceFile).IsTrue();
        }
コード例 #4
0
        public void fullname_should_create_name_with_firstName_and_lastname()
        {
            var fullname = Name.FullName();
            var name     = fullname.Split(" ")[0];
            var lastname = fullname.Split(" ")[1];

            var nameExistOnResourceFile     = Resources.Name.Firstname.Contains(name);
            var lastnameExistOnResourceFile = Resources.Name.Lastname.Contains(lastname);


            Check.That(Regex.IsMatch(fullname, @"\w \w"));
            Check.That(nameExistOnResourceFile).IsTrue();
            Check.That(lastnameExistOnResourceFile).IsTrue();
        }
コード例 #5
0
 public void DoesNotThrowIfRandomMessage(MyMessageType myMessageType)
 {
     Check.ThatCode(MyMessageType.GetDomainCommand).DoesNotThrow();
 }