Beispiel #1
0
        public void DeveRetornarCommandOcorrenciaValida()
        {
            occurrence = CreateOccurrenceCommandFaker.Gerar();

            var command = occurrence.Generate();

            Assert.True(command.Valid);
        }
Beispiel #2
0
        public void DeveRetornarCommandOcorrenciaDescricaoInvalida()
        {
            occurrence = CreateOccurrenceCommandFaker.Gerar();

            var command = occurrence.Generate();

            command.Description = "";
            command.Validate();

            Assert.True(command.Invalid);
        }
Beispiel #3
0
        public void DeveRetornarCommandOcorrenciaDataInvalida()
        {
            occurrence = CreateOccurrenceCommandFaker.Gerar();

            var command = occurrence.Generate();

            command.Date = DateTime.Now.AddDays(2);
            command.Validate();

            Assert.True(command.Invalid);
        }
Beispiel #4
0
        public void DeveRetornarCommandOcorrenciaDescricaoTamanhoMaximoInvalido()
        {
            occurrence = CreateOccurrenceCommandFaker.Gerar();

            var command = occurrence.Generate();

            int i = 0;

            while (i < 255)
            {
                command.Description += "teste";
                i++;
            }

            command.Validate();

            Assert.True(command.Invalid);
        }