From 50f29752f5888ac194a5146c475720c29ae3f172 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 13 Aug 2009 11:48:39 +0900 Subject: Formatting cleanup. Add copyright headers. --- OpenSim/Tests/Common/Mock/TestInventoryService.cs | 29 ++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'OpenSim/Tests/Common') diff --git a/OpenSim/Tests/Common/Mock/TestInventoryService.cs b/OpenSim/Tests/Common/Mock/TestInventoryService.cs index 0c19164..6635700 100644 --- a/OpenSim/Tests/Common/Mock/TestInventoryService.cs +++ b/OpenSim/Tests/Common/Mock/TestInventoryService.cs @@ -1,4 +1,31 @@ -using System; +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; using System.Collections.Generic; using System.Text; using OpenSim.Framework; -- cgit v1.1 From ff28ecee1b35ba24ec538d8ed018c764476c62b4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 14 Aug 2009 20:07:13 +0100 Subject: Re-enable TestSaveIarV0_1() Implement more parts of TestAssetService --- OpenSim/Tests/Common/Mock/TestAssetService.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'OpenSim/Tests/Common') diff --git a/OpenSim/Tests/Common/Mock/TestAssetService.cs b/OpenSim/Tests/Common/Mock/TestAssetService.cs index 5f1184b..81f123a 100644 --- a/OpenSim/Tests/Common/Mock/TestAssetService.cs +++ b/OpenSim/Tests/Common/Mock/TestAssetService.cs @@ -45,7 +45,13 @@ namespace OpenSim.Tests.Common.Mock public AssetBase Get(string id) { - return Assets[ id ]; + AssetBase asset; + if (Assets.ContainsKey(id)) + asset = Assets[id]; + else + asset = null; + + return asset; } public AssetMetadata GetMetadata(string id) @@ -59,8 +65,10 @@ namespace OpenSim.Tests.Common.Mock } public bool Get(string id, object sender, AssetRetrieved handler) - { - throw new NotImplementedException(); + { + handler(id, sender, Get(id)); + + return true; } public string Store(AssetBase asset) -- cgit v1.1