public void ScanCommand_Test_Fluent_FetchColumns() { var command = new ScanCommand <MockDomainObject>(_config, _pool, _map); command.FetchColumns(x => x.Name); command.FetchColumns(x => x.RandomDictionary, "manele"); command.FetchColumns(x => x.RandomEnumerable, "manele"); var actual = command.List(); var test = actual.SingleOrDefault(x => x.Name == "test"); var foo = actual.SingleOrDefault(x => x.Name == "Foo"); var expectedTest = _expectedResults.SingleOrDefault(x => x.Name == "test"); var expectedFoo = _expectedResults.SingleOrDefault(x => x.Name == "Foo"); Assert.Equal(expectedTest?.Name, test?.Name); Assert.Equal(expectedFoo?.Name, foo?.Name); Assert.Null(test.Address); Assert.Null(foo.Address); }
public void ScanCommand_Test_List() { var command = new ScanCommand <MockDomainObject>(_config, _pool, _map); var actual = command.List(); Assert.True(CheckEntities(_expectedResults, actual)); }
public void ScanCommand_Test_Start_End_row() { var command = new ScanCommand <MockDomainObject>(_config, _pool, _map); command.StartFrom("test"); command.EndTo("Foo"); //intercept TSCAN var actual = command.List(); Assert.True(CheckEntities(_expectedResults, actual)); }