Example #1
0
        public void WithoutName_IsInvalid()
        {
            var domain = new AutoMakerBuilder()
                         .WithCountry("Brazil")
                         .WithId(Guid.NewGuid())
                         .Build();

            Assert.False(domain.IsValid());
        }
Example #2
0
        public void WithoutCountry_IsInvalid()
        {
            var domain = new AutoMakerBuilder()
                         .WithName("name example")
                         .WithId(Guid.Empty)
                         .Build();

            Assert.False(domain.IsValid());
        }
Example #3
0
        public void WithoutId_IsInvalid()
        {
            var domain = new AutoMakerBuilder()
                         .WithCountry("Brazil")
                         .WithName("name example")
                         .Build();

            Assert.False(domain.IsValid());
        }
Example #4
0
        public void IsValid()
        {
            var domain = new AutoMakerBuilder()
                         .WithCountry("Brazil")
                         .WithName("name example")
                         .WithId(Guid.NewGuid())
                         .Build();

            Assert.True(domain.IsValid());
        }
Example #5
0
        public void WithNameIsEmpty_IsInvalid()
        {
            var domain = new AutoMakerBuilder()
                         .WithCountry("Brazil")
                         .WithName(string.Empty)
                         .WithId(Guid.NewGuid())
                         .Build();

            Assert.False(domain.IsValid());
        }