public void GetParameterAtは指定したインデックスの引数を取得する()
        {
            // setup
            FixtureBookTestData[] data        = new FixtureBookTestData[4];
            FixtureBook           fixtureBook = FixtureBook.Expect((FixtureBookTestData p1, FixtureBookTestData p2,
                                                                    FixtureBookTestData p3, FixtureBookTestData p4) =>
            {
                data[0] = p1;
                data[1] = p2;
                data[2] = p3;
                data[3] = p4;
            });

            // expect
            Assert.AreSame(data[0], fixtureBook.GetParameterAt <FixtureBookTestData>(0));
            Assert.AreSame(data[1], fixtureBook.GetParameterAt <FixtureBookTestData>(1));
            Assert.AreSame(data[2], fixtureBook.GetParameterAt <FixtureBookTestData>(2));
            Assert.AreSame(data[3], fixtureBook.GetParameterAt <FixtureBookTestData>(3));
            Assert.AreEqual("abc", fixtureBook.GetParameterAt <FixtureBookTestData>(0).Text);
            Assert.AreEqual("def", fixtureBook.GetParameterAt <FixtureBookTestData>(1).Text);
            Assert.AreEqual("ghi", fixtureBook.GetParameterAt <FixtureBookTestData>(2).Text);
            Assert.AreEqual("jkl", fixtureBook.GetParameterAt <FixtureBookTestData>(3).Text);
        }
Beispiel #2
0
        public void GetParameterAtは指定したインデックスの引数を取得する()
        {
            // setup
            FixtureBookTestData[] data = new FixtureBookTestData[4];
            FixtureBook fixtureBook = FixtureBook.Expect((FixtureBookTestData p1, FixtureBookTestData p2,
                FixtureBookTestData p3, FixtureBookTestData p4) =>
            {
                data[0] = p1;
                data[1] = p2;
                data[2] = p3;
                data[3] = p4;
            });

            // expect
            Assert.AreSame(data[0], fixtureBook.GetParameterAt<FixtureBookTestData>(0));
            Assert.AreSame(data[1], fixtureBook.GetParameterAt<FixtureBookTestData>(1));
            Assert.AreSame(data[2], fixtureBook.GetParameterAt<FixtureBookTestData>(2));
            Assert.AreSame(data[3], fixtureBook.GetParameterAt<FixtureBookTestData>(3));
            Assert.AreEqual("abc", fixtureBook.GetParameterAt<FixtureBookTestData>(0).Text);
            Assert.AreEqual("def", fixtureBook.GetParameterAt<FixtureBookTestData>(1).Text);
            Assert.AreEqual("ghi", fixtureBook.GetParameterAt<FixtureBookTestData>(2).Text);
            Assert.AreEqual("jkl", fixtureBook.GetParameterAt<FixtureBookTestData>(3).Text);
        }