-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathMapTransformTest.cs
More file actions
27 lines (25 loc) · 912 Bytes
/
MapTransformTest.cs
File metadata and controls
27 lines (25 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (C) 2003-2010 Xtensive LLC.
// All rights reserved.
// For conditions of distribution and use, see license.
// Created by: Dmitri Maximov
// Created: 2008.08.08
using NUnit.Framework;
using Xtensive.Tuples;
using Xtensive.Tuples.Transform;
using Tuple = Xtensive.Tuples.Tuple;
namespace Xtensive.Orm.Tests.Core.Tuples.Transform
{
[TestFixture]
public class MapTransformTest
{
public void MainTest()
{
var source = Tuple.Create(1);
var transform = new MapTransform(true, TupleDescriptor.Create<byte, int, string>(), new[] {-1, 0});
var result = transform.Apply(TupleTransformType.TransformedTuple, source);
Assert.That(result.GetFieldState(0), Is.EqualTo(TupleFieldState.Default));
Assert.That(result.GetFieldState(1), Is.EqualTo(TupleFieldState.Available));
Assert.That(result.GetFieldState(2), Is.EqualTo(TupleFieldState.Default));
}
}
}