I'm using ReactiveUI-5.99.6 but i'm having trouble making this simple test pass
public class ViewModel : ReactiveObject
{
public ReactiveList<int> List { get; private set; }
public IReactiveCommand Command { get; private set; }
public ViewModel()
{
List = new ReactiveList<int>();
Command = ReactiveCommand.Create(List.Changed.Select(_ => List.Any()));
}
}
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
var vm = new ViewModel();
vm.List.Add(2);
Assert.IsTrue(vm.Command.CanExecute(null));
}
}
Can someone please tell me what am i doing wrong?