Esempio n. 1
0
        public void IsOwnerShareValid()
        {
            var tenement = new Tenement();

            tenement.AddOwner(1, 2).WithName("A");
            tenement.AddOwner(1, 4).WithName("B");
            tenement.AddOwner(1, 4).WithName("C");

            tenement.IsOwnerShareValid().Should().BeTrue();
        }
Esempio n. 2
0
        public void Split()
        {
            var tenement = new Tenement();

            tenement.AddOwner(1, 2).WithName("A");
            tenement.AddOwner(1, 2).WithName("B");
            var owner = tenement
                        .Split(tenement.Owners[0], 1, 3)
                        .WithName("C");

            owner.Share.Numerator.Should().Be(1);
            owner.Share.Denominator.Should().Be(6);
            tenement.Owners[0].Share.Numerator.Should().Be(1);
            tenement.Owners[0].Share.Denominator.Should().Be(3);
            tenement.IsOwnerShareValid().Should().BeTrue();
        }