Esempio n. 1
0
        public void Should_raise_exception_when_sameas_not_verified()
        {
            Address address1 = new Address();
            Address address2 = new Address();

            Contract.Require.That(address2, Is.Not.SameAs(address1)).When("checking not same");
            Assert.Throws<PreConditionException>(delegate { Contract.Require.That(address2, Is.SameAs(address1)).When("checking same"); });
        }
Esempio n. 2
0
        public void Should_raise_exception_when_sameas_not_verified()
        {
            Address address1 = new Address();
            Address address2 = new Address(); ;

            Contract.Require.That(address2, Is.Not.SameAs(address1)).When("checking not same");
            Contract.Require.That(address2, Is.SameAs(address1)).When("checking same");
        }
Esempio n. 3
0
        public void Should_be_same_as()
        {
            Address address1 = new Address();
            Address address2 = address1;

            Contract.Require.That(address2, Is.SameAs(address1)).When("checking same");
        }
        public void TestJIRA210OnSet()
        {
            Address adr = new Address();

            Guid newGuid = Guid.NewGuid();

            ISetAccessor domainSet = factorySet.CreateSetAccessor(typeof(IAddress), "Id");

            domainSet.Set(adr, newGuid);
            Assert.AreEqual(newGuid, adr.Id );
        }