public void CheckIfConfigurationWithSameNameExistsReturnsExpectedValue(
     string applicationName,
     string friendlyName,
     bool fileExists,
     bool expected,
     IFixture fixture,
     [Frozen]Mock<IStoreReader<CmdApplicationConfiguration>> storeReader,
     JsonCmdApplicationConfigurationRepository sut)
 {
     var applicationConfiguration = GetApplicationConfiguration(applicationName, friendlyName, fixture);
     storeReader.Setup(a => a.CheckIfFileExists(applicationConfiguration)).Returns(fileExists);
     var actual = sut.CheckIfConfigurationWithSameNameExists(applicationConfiguration);
     Assert.Equal(expected, actual);
 }
示例#2
0
        public void CheckIfConfigurationWithSameNameExistsReturnsExpectedValue(
            string applicationName,
            string friendlyName,
            bool fileExists,
            bool expected,
            IFixture fixture,
            [Frozen] Mock <IStoreReader <CmdApplicationConfiguration> > storeReader,
            JsonCmdApplicationConfigurationRepository sut)
        {
            var applicationConfiguration = GetApplicationConfiguration(applicationName, friendlyName, fixture);

            storeReader.Setup(a => a.CheckIfFileExists(applicationConfiguration)).Returns(fileExists);
            var actual = sut.CheckIfConfigurationWithSameNameExists(applicationConfiguration);

            Assert.Equal(expected, actual);
        }
示例#3
0
 public void CheckIfConfigurationWithSameNameExistsWithNullValueThrowsException(
     JsonCmdApplicationConfigurationRepository sut)
 {
     Assert.Throws <ArgumentNullException>(() => sut.CheckIfConfigurationWithSameNameExists(null));
 }
 public void CheckIfConfigurationWithSameNameExistsWithNullValueThrowsException(
     JsonCmdApplicationConfigurationRepository sut)
 {
     Assert.Throws<ArgumentNullException>(() => sut.CheckIfConfigurationWithSameNameExists(null));
 }