Ejemplo n.º 1
0
    public async Task TestUpdateDataWithNumeric()
    {
        UpdateDataWithNumericAsyncSample updateNumericSample = new UpdateDataWithNumericAsyncSample();
        var rowCount = await updateNumericSample.UpdateDataWithNumericAsync(_spannerFixture.ProjectId, _spannerFixture.InstanceId, _spannerFixture.DatabaseId);

        Assert.Equal(3, rowCount);
    }
    public async Task TestQueryDataWithNumericParameter()
    {
        UpdateDataWithNumericAsyncSample updateNumericSample = new UpdateDataWithNumericAsyncSample();
        await updateNumericSample.UpdateDataWithNumericAsync(_spannerFixture.ProjectId, _spannerFixture.InstanceId, _spannerFixture.DatabaseId);

        QueryDataWithNumericParameterAsyncSample queryNumericSample = new QueryDataWithNumericParameterAsyncSample();
        var venues = await queryNumericSample.QueryDataWithNumericParameterAsync(_spannerFixture.ProjectId, _spannerFixture.InstanceId, _spannerFixture.DatabaseId);

        Assert.Contains(venues, v => v.VenueId == 4);
    }
Ejemplo n.º 3
0
    public async Task TestUpdateDataWithNumeric()
    {
        await _spannerFixture.CreateVenuesTableAndInsertDataAsync();

        AddNumericColumnAsyncSample addColumnSample = new AddNumericColumnAsyncSample();
        await addColumnSample.AddNumericColumnAsync(_spannerFixture.ProjectId, _spannerFixture.InstanceId, _spannerFixture.DatabaseId);

        UpdateDataWithNumericAsyncSample updateNumericSample = new UpdateDataWithNumericAsyncSample();
        await updateNumericSample.UpdateDataWithNumericAsync(_spannerFixture.ProjectId, _spannerFixture.InstanceId, _spannerFixture.DatabaseId);

        await _spannerFixture.DeleteVenuesTable();
    }
Ejemplo n.º 4
0
    public async Task TestQueryDataWithNumericParameter()
    {
        await _spannerFixture.CreateVenuesTableAndInsertDataAsync();

        AddNumericColumnAsyncSample addColumnSample = new AddNumericColumnAsyncSample();
        await addColumnSample.AddNumericColumnAsync(_spannerFixture.ProjectId, _spannerFixture.InstanceId, _spannerFixture.DatabaseId);

        UpdateDataWithNumericAsyncSample updateNumericSample = new UpdateDataWithNumericAsyncSample();
        await updateNumericSample.UpdateDataWithNumericAsync(_spannerFixture.ProjectId, _spannerFixture.InstanceId, _spannerFixture.DatabaseId);

        QueryDataWithNumericParameterAsyncSample queryNumericSample = new QueryDataWithNumericParameterAsyncSample();
        var venues = await queryNumericSample.QueryDataWithNumericParameterAsync(_spannerFixture.ProjectId, _spannerFixture.InstanceId, _spannerFixture.DatabaseId);

        Assert.Contains(venues, v => v.VenueId == 4);

        await _spannerFixture.DeleteVenuesTable();
    }