public async Task <ActionResult> CheckSequenceStream_mRNA(Sequence_mRNAStream sequence_mRNAStream)
        {
            _logger.LogDebug("Executing CheckSequenceStream_mRNA from controller Sequence_mRNAController");

            Sequence_mRNAStreamService sequence_mRNAStreamService = new Sequence_mRNAStreamService(_logger3);

            return(Ok(await sequence_mRNAStreamService.CheckSequence_mRNA(sequence_mRNAStream.Path, sequence_mRNAStream.Counter).ConfigureAwait(false)));
        }
Esempio n. 2
0
        public void CheckSequence_mRNAStreamIncorrectCharacters(string path, int counter)
        {
            var mock = new Mock <ILogger <Sequence_mRNAStreamService> >();
            ILogger <Sequence_mRNAStreamService> logger = mock.Object;
            Sequence_mRNAStreamService           sequence_mRNAStreamService = new Sequence_mRNAStreamService(logger);

            var ex = Assert.Throws <ArgumentException>(() => sequence_mRNAStreamService.CheckSequence_mRNA(path, counter));

            Assert.That(ex.Message, Is.EqualTo("The 'sequence' field must not have different characters than ´A´, ´U´, ´G´ and ´C´. Error at char index 0."));
        }
Esempio n. 3
0
        public void CheckSequence_mRNAStreamIncorrectLenght(string path, int counter)
        {
            var mock = new Mock <ILogger <Sequence_mRNAStreamService> >();
            ILogger <Sequence_mRNAStreamService> logger = mock.Object;
            Sequence_mRNAStreamService           sequence_mRNAStreamService = new Sequence_mRNAStreamService(logger);

            var ex = Assert.Throws <ArgumentException>(() => sequence_mRNAStreamService.CheckSequence_mRNA(path, counter));

            Assert.That(ex.Message, Is.EqualTo("The 'sequence' field has an incorrect lenght. Error at char index 26."));
        }
Esempio n. 4
0
        public void CheckSequence_mRNAStreamNotNull(string path, int counter)
        {
            var mock = new Mock <ILogger <Sequence_mRNAStreamService> >();
            ILogger <Sequence_mRNAStreamService> logger = mock.Object;
            Sequence_mRNAStreamService           sequence_mRNAStreamService = new Sequence_mRNAStreamService(logger);

            var ex = Assert.Throws <ArgumentException>(() => sequence_mRNAStreamService.CheckSequence_mRNA(path, counter));

            Assert.That(ex.Message, Is.EqualTo("The 'sequence' field can not be null. Error at char index 0."));
        }
Esempio n. 5
0
        public void CheckSequence_mRNAStream(string path, int counter)
        {
            var mock = new Mock <ILogger <Sequence_mRNAStreamService> >();
            ILogger <Sequence_mRNAStreamService> logger = mock.Object;
            Sequence_mRNAStreamService           sequence_mRNAStreamService = new Sequence_mRNAStreamService(logger);

            var gene = sequence_mRNAStreamService.CheckSequence_mRNA(path, counter).Result;

            Assert.AreEqual(gene, "AAAUUUUAA");
        }