<commit_before>﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using System;
using TravelAlbum.Data.Contracts;
using TravelAlbum.DataServices;
using TravelAlbum.Models;

namespace TravelAlbum.UnitTests.DataServices.TravelServiceTest
{
    [TestClass]
    public class Constructor_Should
    {
        [TestMethod]
        public void ReturnsAnInstance_WhenBothParametersAreNotNull()
        {
            // Arrange
            var wrapperMock = new Mock<IEfDbSetWrapper<Travel>>();
            var dbContextMock = new Mock<ITravelAlbumEfDbContextSaveChanges>();

            // Act
            TravelService travelService = new TravelService(wrapperMock.Object, dbContextMock.Object);

            // Assert
            Assert.IsNotNull(travelService);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void ThrowException_WhenBookSetWrapperIsNull()
        {
            // Arrange
            var dbContextMock = new Mock<ITravelAlbumEfDbContextSaveChanges>();

            // Act & Assert
           TravelService travelService = new TravelService(null, dbContextMock.Object);
        }

       [TestMethod]
       [ExpectedException(typeof(ArgumentNullException))]
       public void ThrowException_WhenDbContextIsNull()
       {
           // Arrange
           var wrapperMock = new Mock<IEfDbSetWrapper<Travel>>();

            // Act & Assert
            TravelService travelService = new TravelService(wrapperMock.Object, null);
        }
    }
}
<commit_msg>Namespace for constructr travel service tests changed<commit_after>﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using System;
using TravelAlbum.Data.Contracts;
using TravelAlbum.DataServices;
using TravelAlbum.Models;

namespace TravelAlbum.UnitTests.DataServices.TravelServiceTests
{
    [TestClass]
    public class Constructor_Should
    {
        [TestMethod]
        public void ReturnsAnInstance_WhenBothParametersAreNotNull()
        {
            // Arrange
            var wrapperMock = new Mock<IEfDbSetWrapper<Travel>>();
            var dbContextMock = new Mock<ITravelAlbumEfDbContextSaveChanges>();

            // Act
            TravelService travelService = new TravelService(wrapperMock.Object, dbContextMock.Object);

            // Assert
            Assert.IsNotNull(travelService);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void ThrowException_WhenBookSetWrapperIsNull()
        {
            // Arrange
            var dbContextMock = new Mock<ITravelAlbumEfDbContextSaveChanges>();

            // Act & Assert
           TravelService travelService = new TravelService(null, dbContextMock.Object);
        }

       [TestMethod]
       [ExpectedException(typeof(ArgumentNullException))]
       public void ThrowException_WhenDbContextIsNull()
       {
           // Arrange
           var wrapperMock = new Mock<IEfDbSetWrapper<Travel>>();

            // Act & Assert
            TravelService travelService = new TravelService(wrapperMock.Object, null);
        }
    }
}

{'fraction_non_alphanumeric': 0.0787704130643612, 'fraction_numerical': 0.0, 'mean_word_length': 2.554038680318544, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5529832', 'n_tokens_mistral': 800, 'n_tokens_neox': 763, 'n_words': 152}