public void ShouldCalculateConflict() { // Setup _model.Assign("NSW", new DummyCspValue("R")); _model.Assign("Q", new DummyCspValue("R")); // Act var nConflicts = _model.Conflicts("SA", new DummyCspValue("R")); // Verify Assert.Equal(2, nConflicts); Assert.Equal(3, _model.GetDomain("NSW").Values.Count); Assert.Equal(3, _model.GetDomain("Q").Values.Count); Assert.Equal(3, _model.GetDomain("SA").Values.Count); }
/// <summary> /// Compute number of conflicts by given value /// </summary> /// <param name="key">Key</param> /// <param name="value">Value to test</param> /// <returns>Number of conflicts</returns> public int Conflicts(string key, T value) => _model.Conflicts(key, value);