コード例 #1
0
        public void Equals_EqualEmptyModsets_ReturnsTrue()
        {
            var firstModset  = ModsetHelpers.CreateEmptyModset(_fixture);
            var secondModset = ModsetHelpers.CopyModset(firstModset);

            var result = firstModset.Equals(secondModset);

            result.Should().BeTrue();
        }
コード例 #2
0
        public void PrepareKeysForModset_NoModsArmaBikeyOnly_RemovesOldKeysFromKeysDirectory()
        {
            var modset = ModsetHelpers.CreateEmptyModset(_fixture);

            _fileSystem.CreateBikeyFileInFileSystem(_keysDirectory, _fixture.CreateFileName(KeysConstants.KeyExtension));

            var keysPreparer = _serviceProvider.GetService <IKeysPreparer>() !;

            var result = keysPreparer.PrepareKeysForModset(modset);

            using (new AssertionScope())
            {
                result.ShouldBeSuccess();

                var expectedBikeyNames = KeysConstants.ArmaKey.AsList();

                AssertCorrectBikeysInDirectory(
                    _fileSystem,
                    _keysDirectory,
                    expectedBikeyNames);
            }
        }