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 CreateNewConfigurationWithNullValueThrowsException(JsonCmdApplicationConfigurationRepository sut)
 {
     Assert.Throws <ArgumentNullException>(() => sut.CreateNewConfiguration(null));
 }
コード例 #4
0
 public void CheckIfConfigurationWithSameNameExistsWithNullValueThrowsException(
     JsonCmdApplicationConfigurationRepository sut)
 {
     Assert.Throws <ArgumentNullException>(() => sut.CheckIfConfigurationWithSameNameExists(null));
 }
 public void CreateNewConfigurationWithNullValueThrowsException(JsonCmdApplicationConfigurationRepository sut)
 {
     Assert.Throws<ArgumentNullException>(() => sut.CreateNewConfiguration(null));
 }
 public void CheckIfConfigurationWithSameNameExistsWithNullValueThrowsException(
     JsonCmdApplicationConfigurationRepository sut)
 {
     Assert.Throws<ArgumentNullException>(() => sut.CheckIfConfigurationWithSameNameExists(null));
 }